[K/N][build] Dependencies fixes: trove4j and kotlin-compiler

* Depend on kotlin-compiler project instead of its runtimeElements only
* trove4j fixes: add as a dependency and use common version
* Strip dependencies in different projects: remove unnecessary
This commit is contained in:
Pavel Punegov
2022-10-11 18:44:48 +02:00
committed by Space Team
parent ea6b784e41
commit d2c58cdd27
8 changed files with 31 additions and 22 deletions
+9 -2
View File
@@ -111,9 +111,16 @@ fun nativeTest(taskName: String, vararg tags: String) = projectTest(
TestProperty.COMPILER_CLASSPATH.setUpFromGradleProperty(this) {
val customNativeHome = TestProperty.KOTLIN_NATIVE_HOME.readGradleProperty(this)
if (customNativeHome != null) {
file(customNativeHome).resolve("konan/lib/kotlin-native-compiler-embeddable.jar").absolutePath
file(customNativeHome).run {
val embeddableJar = resolve("konan/lib/kotlin-native-compiler-embeddable.jar").absolutePath
val troveJar = resolve("konan/lib/trove4j.jar").absolutePath
troveJar + File.pathSeparatorChar.toString() + embeddableJar
}
} else {
val kotlinNativeCompilerEmbeddable = configurations.detachedConfiguration(dependencies.project(":kotlin-native-compiler-embeddable"))
val kotlinNativeCompilerEmbeddable = configurations.detachedConfiguration(
dependencies.project(":kotlin-native-compiler-embeddable"),
dependencies.module(commonDependency("org.jetbrains.intellij.deps:trove4j"))
)
dependsOn(kotlinNativeCompilerEmbeddable)
kotlinNativeCompilerEmbeddable.files.joinToString(";")
}