gradle-plugin: Rename kLib -> klib

This commit is contained in:
Ilya Matveev
2017-09-19 19:35:35 +03:00
committed by ilmat192
parent beb2ed07dc
commit beb6c3eb10
4 changed files with 10 additions and 7 deletions
+5 -2
View File
@@ -1,5 +1,8 @@
# Kotlin/Native Gradle plugin
__Note__: The new __process*InteropName*Interop__ task is used for interop processing instead of the old ones
(__gen*InteropName*InteropStubs__ and __compile*InteropName*InteropStubs__, see [Tasks](#tasks))
## Overview
You may use the Gradle plugin to build _Kotlin/Native_ projects. To use it you need to include the following snippet in
@@ -165,7 +168,7 @@ You may get this task using `interopProcessingTask` property of an interop objec
|Property |Type |Description |
|-------------- |----------------------------|--------------------------------------------------------|
|`outputDir `|`File` |An output directory for the *.klib built |
|`kLib `|`File` |The *.klib built |
|`klib `|`File` |The *.klib built |
|`defFile `|`File` |Def-file used by the interop |
|`compilerOpts `|`List<String>` |Additional options passed to clang |
|`linkerOpts `|`List<String>` |Additional options passed to a linker |
@@ -173,7 +176,7 @@ You may get this task using `interopProcessingTask` property of an interop objec
|`linkFiles `|`Collection<FileCollection>`|Additional files linked with the stubs |
|`measureTime `|`boolean` |Does the compiler print phase time for stubs compilation|
_Note_: In versions before 0.4 two tasks for each an interop were used: __gen*InteropName*InteropStubs__ and
_Note_: In versions before 0.3.4 two tasks for each an interop were used: __gen*InteropName*InteropStubs__ and
__compile*InteropName*InteropStubs__. Now actions of both of them are performed by the
__process*InteropName*Interop__ task described above.
@@ -163,7 +163,7 @@ open class KonanCompileConfig(
val generateStubsTask = interop.interopProcessingTask
dependsOn(generateStubsTask)
library(project.files(generateStubsTask.kLib))
library(project.files(generateStubsTask.klib))
interops.add(interop)
}
@@ -33,14 +33,14 @@ open class KonanInteropTask: KonanTargetableTask() {
dependsOn(project.konanCompilerDownloadTask)
this.libName = libName
this.defFile = project.konanDefaultDefFile(libName)
this.kLib = outputDir.resolve("$libName.klib")
this.klib = outputDir.resolve("$libName.klib")
}
// Output directories -----------------------------------------------------
@Internal val outputDir = project.file(project.konanInteropOutputDir)
lateinit var kLib: File
lateinit var klib: File
@OutputFile get
// Interop stub generator parameters -------------------------------------
@@ -80,7 +80,7 @@ open class KonanInteropTask: KonanTargetableTask() {
protected fun buildArgs() = mutableListOf<String>().apply {
addArg("-properties", "${project.konanHome}/konan/konan.properties")
addArg("-o", kLib.canonicalPath)
addArg("-o", klib.canonicalPath)
addArgIfNotNull("-target", target)
addArgIfNotNull("-def", defFile.canonicalPath)
@@ -175,7 +175,7 @@ internal fun dumpProperties(task: Task) {
println()
println("Stub generation task: ${task.name}")
println("outputDir : ${task.outputDir}")
println("kLib : ${task.kLib}")
println("klib : ${task.klib}")
println("defFile : ${task.defFile}")
println("target : ${task.target}")
println("pkg : ${task.pkg}")