Create a copy of shared code for building JVM part of native interop runtime
This is required because IDEA cannot import the same directory in multiple modules.
This commit is contained in:
committed by
Space Team
parent
66639d37ec
commit
23e0e40acc
@@ -52,7 +52,19 @@ dependencies {
|
|||||||
implementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
|
implementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets.main.get().java.srcDir("src/jvm/kotlin")
|
val prepareSharedSourcesForJvm by tasks.registering(Sync::class) {
|
||||||
|
from("src/main/kotlin")
|
||||||
|
into("$buildDir/src/main/kotlin")
|
||||||
|
}
|
||||||
|
val prepareKotlinIdeaImport by tasks.registering {
|
||||||
|
dependsOn(prepareSharedSourcesForJvm)
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets.main.configure {
|
||||||
|
kotlin.setSrcDirs(emptyList<String>())
|
||||||
|
kotlin.srcDir("src/jvm/kotlin")
|
||||||
|
kotlin.srcDir(prepareSharedSourcesForJvm)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||||
|
|||||||
Reference in New Issue
Block a user