[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:
Svyatoslav Scherbina
2021-08-30 15:51:38 +03:00
committed by Space
parent e65f2e465e
commit 751914ca4d
2 changed files with 8 additions and 1 deletions
@@ -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())
@@ -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)