gradle-plugin: Rerun tasks if konan.home property is changes
#KT-20193 Fixed
This commit is contained in:
+5
-2
@@ -96,8 +96,11 @@ open class KonanCompileTask: KonanTargetableTask() {
|
||||
internal set
|
||||
|
||||
@Input var dumpParameters: Boolean = false
|
||||
// TODO: Is there a better way to rerun tasks when the compiler version changes?
|
||||
@Input val konanVersion = project.konanVersion
|
||||
|
||||
val konanVersion
|
||||
@Input get() = project.konanVersion
|
||||
val konanHome
|
||||
@Input get() = project.konanHome
|
||||
|
||||
// Task action ------------------------------------------------------------
|
||||
|
||||
|
||||
+4
-1
@@ -65,7 +65,10 @@ open class KonanInteropTask: KonanTargetableTask() {
|
||||
@InputFiles val headers = mutableSetOf<FileCollection>()
|
||||
@InputFiles val linkFiles = mutableSetOf<FileCollection>()
|
||||
|
||||
@Input val konanVersion = project.konanVersion
|
||||
val konanVersion
|
||||
@Input get() = project.konanVersion
|
||||
val konanHome
|
||||
@Input get() = project.konanHome
|
||||
|
||||
@TaskAction
|
||||
fun exec() {
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ internal fun Project.setProperty(property: KonanPlugin.ProjectProperty, value: A
|
||||
internal val Project.konanHome: String
|
||||
get() {
|
||||
assert(hasProperty(KonanPlugin.ProjectProperty.KONAN_HOME))
|
||||
return getProperty(KonanPlugin.ProjectProperty.KONAN_HOME).toString()
|
||||
return project.file(getProperty(KonanPlugin.ProjectProperty.KONAN_HOME)).canonicalPath
|
||||
}
|
||||
|
||||
internal val Project.konanBuildRoot get() = "${buildDir.canonicalPath}/konan"
|
||||
|
||||
Reference in New Issue
Block a user