plugins { id 'org.jetbrains.kotlin.multiplatform' id 'org.jetbrains.kotlin.plugin.serialization' } sourceCompatibility = '1.8' targetCompatibility = '1.8' group rootProject.group version rootProject.version kotlin { jvm { compilations.main.kotlinOptions { // Setup the Kotlin compiler options for the 'main' compilation: jvmTarget = "$version_kotlin_jvmTarget" } compilations.test.kotlinOptions { // Setup the Kotlin compiler options for the 'main' compilation: jvmTarget = "$version_kotlin_jvmTarget" } } js(LEGACY) { browser { testTask { useKarma { useChromeHeadless() //change to useChrome to run the actual browser webpackConfig.cssSupport.enabled = true } } } } sourceSets { commonMain { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-common:$version_kotlin" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version_coroutines" implementation "io.ktor:ktor-client-core:$version_ktor" implementation "io.ktor:ktor-client-json:$version_ktor" implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$version_kotlinx_serialization" implementation "io.github.aakira:napier:$version_napier" implementation project(":lib-database") implementation project(":lib-database-entities") implementation "com.github.UstadMobile.door:door-runtime:$version_door" implementation "com.github.UstadMobile.door:room-annotations:$version_door" } } jvmMain { kotlin.srcDir("build/generated/source/door") dependencies { implementation project(":lib-database") implementation "io.ktor:ktor-client-okhttp:$version_ktor" implementation "io.ktor:ktor-client-gson:$version_ktor" implementation "io.github.aakira:napier-jvm:$version_napier" } } jsMain { kotlin.srcDir("$buildDir/generated/source/door-js") } } } assemble.dependsOn(":lib-database:build")