Make KotlinNativeTasks.konanTargetsForManifest non-nullable, otherwise Gradle fails
This commit is contained in:
+3
-2
@@ -249,10 +249,11 @@ abstract class AbstractKotlinNativeCompile<T : KotlinCommonToolOptions> : Abstra
|
|||||||
|
|
||||||
@get:Input
|
@get:Input
|
||||||
@get:Optional
|
@get:Optional
|
||||||
internal val konanTargetsForManifest: String? by project.provider {
|
internal val konanTargetsForManifest: String by project.provider {
|
||||||
(compilation as? KotlinSharedNativeCompilation)
|
(compilation as? KotlinSharedNativeCompilation)
|
||||||
?.konanTargets
|
?.konanTargets
|
||||||
?.joinToString(separator = " ") { it.visibleName }
|
?.joinToString(separator = " ") { it.visibleName }
|
||||||
|
.orEmpty()
|
||||||
}
|
}
|
||||||
|
|
||||||
@get:Internal
|
@get:Internal
|
||||||
@@ -301,7 +302,7 @@ abstract class AbstractKotlinNativeCompile<T : KotlinCommonToolOptions> : Abstra
|
|||||||
val manifestFile: File = manifestFile.get()
|
val manifestFile: File = manifestFile.get()
|
||||||
manifestFile.ensureParentDirsCreated()
|
manifestFile.ensureParentDirsCreated()
|
||||||
val properties = java.util.Properties()
|
val properties = java.util.Properties()
|
||||||
properties[KLIB_PROPERTY_NATIVE_TARGETS] = konanTargetsForManifest!!
|
properties[KLIB_PROPERTY_NATIVE_TARGETS] = konanTargetsForManifest
|
||||||
properties.saveToFile(org.jetbrains.kotlin.konan.file.File(manifestFile.toPath()))
|
properties.saveToFile(org.jetbrains.kotlin.konan.file.File(manifestFile.toPath()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user