[Native][tests] Gradle property kotlin.internal.native.test.compilerClasspath: when not specified compute the default value based on kotlin.internal.native.test.nativeHome property, or fallback to JAR artifact of :kotlin-native-compiler-embeddable project when kotlin.internal.native.test.nativeHome not specified.

This commit is contained in:
Dmitriy Dolovov
2021-12-28 17:18:37 +03:00
parent 52c1a339c4
commit 3f056bc086
+8 -3
View File
@@ -101,9 +101,14 @@ fun blackBoxTest(taskName: String, vararg tags: String) = projectTest(taskName,
}
TestProperty.COMPILER_CLASSPATH.setUpFromGradleProperty(this) {
val kotlinNativeCompilerEmbeddable = configurations.detachedConfiguration(dependencies.project(":kotlin-native-compiler-embeddable"))
dependsOn(kotlinNativeCompilerEmbeddable)
kotlinNativeCompilerEmbeddable.files.joinToString(";")
val customNativeHome = TestProperty.KOTLIN_NATIVE_HOME.readGradleProperty(this)
if (customNativeHome != null) {
file(customNativeHome).resolve("konan/lib/kotlin-native-compiler-embeddable.jar").absolutePath
} else {
val kotlinNativeCompilerEmbeddable = configurations.detachedConfiguration(dependencies.project(":kotlin-native-compiler-embeddable"))
dependsOn(kotlinNativeCompilerEmbeddable)
kotlinNativeCompilerEmbeddable.files.joinToString(";")
}
}
// Pass Gradle properties as JVM properties so test process can read them.