[Gradle, Native] Make useEmbeddableCompilerJar input of compile tasks
to make the tasks not up-to-date when switching the flag
This commit is contained in:
committed by
Space
parent
e65f2e465e
commit
751914ca4d
+4
-1
@@ -66,10 +66,13 @@ class NativeEmbeddableCompilerJarIT : BaseGradleIT() {
|
||||
}
|
||||
}
|
||||
|
||||
build(":clean") {} // Ensure the tasks aren't up-to-date.
|
||||
build(":runDebugExecutableHost") {
|
||||
assertTasksUpToDate(":linkDebugExecutableHost", ":compileKotlinHost")
|
||||
}
|
||||
|
||||
build(":runDebugExecutableHost", "-Pkotlin.native.useEmbeddableCompilerJar=true") {
|
||||
assertSuccessful()
|
||||
assertTasksExecuted(":linkDebugExecutableHost", ":compileKotlinHost")
|
||||
checkNativeCompilerClasspath(":linkDebugExecutableHost", ":compileKotlinHost") {
|
||||
assertFalse(it.includesRegularJar())
|
||||
assertTrue(it.includesEmbeddableJar())
|
||||
|
||||
+4
@@ -206,6 +206,10 @@ abstract class AbstractKotlinNativeCompile<T : KotlinCommonToolOptions, K : Kotl
|
||||
val kotlinNativeVersion: String
|
||||
get() = project.konanVersion.toString()
|
||||
|
||||
@get:Input
|
||||
internal val useEmbeddableCompilerJar: Boolean
|
||||
get() = project.nativeUseEmbeddableCompilerJar
|
||||
|
||||
@Internal
|
||||
open val outputFile: Provider<File> = project.provider {
|
||||
val prefix = outputKind.prefix(konanTarget)
|
||||
|
||||
Reference in New Issue
Block a user