[Gradle] Support KotlinNativeLinkArtifactTask with Configuration Cache
This commit is contained in:
+11
-8
@@ -34,13 +34,14 @@ open class KotlinNativeLinkArtifactTask @Inject constructor(
|
|||||||
@get:Input
|
@get:Input
|
||||||
var baseName: String = project.name
|
var baseName: String = project.name
|
||||||
|
|
||||||
private val defaultDestinationDir: File
|
private val buildDir = project.buildDir
|
||||||
get() {
|
|
||||||
val kind = outputKind.visibleName
|
private val defaultDestinationDir: File get() {
|
||||||
val target = konanTarget.visibleName
|
val kind = outputKind.visibleName
|
||||||
val type = if (debuggable) "debug" else "release"
|
val target = konanTarget.visibleName
|
||||||
return project.buildDir.resolve("out/$kind/$target/$type")
|
val type = if (debuggable) "debug" else "release"
|
||||||
}
|
return buildDir.resolve("out/$kind/$target/$type")
|
||||||
|
}
|
||||||
|
|
||||||
private var customDestinationDir: File? = null
|
private var customDestinationDir: File? = null
|
||||||
|
|
||||||
@@ -109,6 +110,8 @@ open class KotlinNativeLinkArtifactTask @Inject constructor(
|
|||||||
@get:Input
|
@get:Input
|
||||||
var binaryOptions: Map<String, String> = emptyMap()
|
var binaryOptions: Map<String, String> = emptyMap()
|
||||||
|
|
||||||
|
private val nativeBinaryOptions = PropertiesProvider(project).nativeBinaryOptions
|
||||||
|
|
||||||
@get:Internal
|
@get:Internal
|
||||||
val kotlinOptions = object : KotlinCommonToolOptions {
|
val kotlinOptions = object : KotlinCommonToolOptions {
|
||||||
override var allWarningsAsErrors: Boolean = false
|
override var allWarningsAsErrors: Boolean = false
|
||||||
@@ -158,7 +161,7 @@ open class KotlinNativeLinkArtifactTask @Inject constructor(
|
|||||||
|
|
||||||
fun FileCollection.klibs() = files.filter { it.extension == "klib" }
|
fun FileCollection.klibs() = files.filter { it.extension == "klib" }
|
||||||
|
|
||||||
val localBinaryOptions = PropertiesProvider(project).nativeBinaryOptions + binaryOptions
|
val localBinaryOptions = nativeBinaryOptions + binaryOptions
|
||||||
|
|
||||||
val buildArgs = buildKotlinNativeBinaryLinkerArgs(
|
val buildArgs = buildKotlinNativeBinaryLinkerArgs(
|
||||||
outFile = outFile,
|
outFile = outFile,
|
||||||
|
|||||||
Reference in New Issue
Block a user