Add libraries provided by the K/N compiler in dependencies

This commit is contained in:
Ilya Matveev
2018-09-05 16:27:48 +03:00
committed by Mikhail Glukhikh
parent c4a33e0a2f
commit 299e508204
@@ -59,6 +59,9 @@ open class KotlinNativeCompile : DefaultTask() {
val kotlinNativeVersion: String
@Input get() = KonanCompilerDownloadTask.compilerVersion.toString()
val kotlinNativeHome: File
@Input get() = project.file(project.konanHome)
// We manually register this property as output file or directory depending on output kind.
@Internal
val outputFile: Property<File> = project.objects.property(File::class.java)
@@ -132,7 +135,7 @@ open class KotlinNativeCompile : DefaultTask() {
libraries.files.filter {
// Support only klib files for now.
it.extension == "klib" && !it.providedByCompiler
it.extension == "klib" || !it.providedByCompiler
}.forEach { library ->
library.parent?.let { addArg("-r", it) }
addArg("-l", library.nameWithoutExtension)