diff --git a/GRADLE_PLUGIN.md b/GRADLE_PLUGIN.md index 79ebfe5fdf9..90f2a850b7c 100644 --- a/GRADLE_PLUGIN.md +++ b/GRADLE_PLUGIN.md @@ -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` |Additional options passed to clang | |`linkerOpts `|`List` |Additional options passed to a linker | @@ -173,7 +176,7 @@ You may get this task using `interopProcessingTask` property of an interop objec |`linkFiles `|`Collection`|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. diff --git a/tools/kotlin-native-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KonanCompileTask.kt b/tools/kotlin-native-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KonanCompileTask.kt index 478c35ee239..c4383cb3df5 100644 --- a/tools/kotlin-native-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KonanCompileTask.kt +++ b/tools/kotlin-native-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KonanCompileTask.kt @@ -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) } diff --git a/tools/kotlin-native-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KonanInteropTask.kt b/tools/kotlin-native-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KonanInteropTask.kt index 42264c6a7d4..ae9b30da228 100644 --- a/tools/kotlin-native-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KonanInteropTask.kt +++ b/tools/kotlin-native-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KonanInteropTask.kt @@ -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().apply { addArg("-properties", "${project.konanHome}/konan/konan.properties") - addArg("-o", kLib.canonicalPath) + addArg("-o", klib.canonicalPath) addArgIfNotNull("-target", target) addArgIfNotNull("-def", defFile.canonicalPath) diff --git a/tools/kotlin-native-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KonanPlugin.kt b/tools/kotlin-native-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KonanPlugin.kt index e1e540286eb..f8923a0af87 100644 --- a/tools/kotlin-native-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KonanPlugin.kt +++ b/tools/kotlin-native-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KonanPlugin.kt @@ -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}")