Gabriel Santos
09/25/2020, 9:25 PM:core
and :common
, both of them are multiplatform supporting all existent platforms.
But when I try to add :common as a dependency to core, the build doesn't fail, but it's not imported, here's my build.gradle.kts in :core
plugins {
kotlin("multiplatform") apply true
}
repositories {
mavenCentral()
}
dependencies {
implementation(project(":common"))
}
kotlin {
jvm {
compilations.all {
kotlinOptions.jvmTarget = "1.8"
}
}
js {
browser {
testTask {
useKarma {
useChromeHeadless()
webpackConfig.cssSupport.enabled = true
}
}
}
}
val hostOs = System.getProperty("os.name")
val isMingwX64 = hostOs.startsWith("Windows")
val nativeTarget = when {
hostOs == "Mac OS X" -> macosX64("native")
hostOs == "Linux" -> linuxX64("native")
isMingwX64 -> mingwX64("native")
else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
}
sourceSets {
val commonMain by getting
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
val jvmMain by getting
val jvmTest by getting {
dependencies {
implementation(kotlin("test-junit"))
}
}
val jsMain by getting
val jsTest by getting {
dependencies {
implementation(kotlin("test-js"))
}
}
val nativeMain by getting
val nativeTest by getting
}
}
edrd
09/26/2020, 2:05 AMcommonMain
source set?
https://kotlinlang.org/docs/reference/mpp-add-dependencies.htmledrd
09/26/2020, 2:06 AMGabriel Santos
09/26/2020, 12:54 PM