From 5e1866f26247bcdb4fc7fd5bb1b4d3ccb6ee46a1 Mon Sep 17 00:00:00 2001 From: Ilya Matveev Date: Thu, 7 Sep 2017 17:38:52 +0300 Subject: [PATCH] gradle-plugin: Remove manifest compilation parameter --- GRADLE_PLUGIN.md | 2 -- .../kotlin/gradle/plugin/KonanCompileTask.kt | 9 ------ .../test/IncrementalSpecification.groovy | 30 ------------------- 3 files changed, 41 deletions(-) diff --git a/GRADLE_PLUGIN.md b/GRADLE_PLUGIN.md index 01408985de4..79ebfe5fdf9 100644 --- a/GRADLE_PLUGIN.md +++ b/GRADLE_PLUGIN.md @@ -242,8 +242,6 @@ For this project the task graph will be the following: enableAssertions() // Enable assertions in binaries generated. enableDebug() // Enable debugging for binaries generated. - manifest 'path/to/manifest.file' // A manifest addend file. - // Arguments to be passed to a linker. linkerOpts 'Some linker opts' 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 7ec3a94deee..7fb9ce82479 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 @@ -95,9 +95,6 @@ open class KonanCompileTask: KonanTargetableTask() { @Optional @Input var apiVersion : String? = null internal set - @Optional @InputFile var manifest : File? = null - internal set - @Input var dumpParameters: Boolean = false // TODO: Is there a better way to rerun tasks when the compiler version changes? @Input val konanVersion = project.konanVersion @@ -116,8 +113,6 @@ open class KonanCompileTask: KonanTargetableTask() { addArgIfNotNull("-target", target) addArgIfNotNull("-language-version", languageVersion) addArgIfNotNull("-api-version", apiVersion) - // TODO: Should we get manifests of the interops used? - addArgIfNotNull("-manifest", manifest?.canonicalPath) addKey("-g", enableDebug) addKey("-nostdlib", noStdLib) @@ -229,10 +224,6 @@ open class KonanCompileConfig( _linkerOpts.addAll(args) } - fun manifest(arg: Any) = with(compilationTask) { - manifest = project.file(arg) - } - fun target(tgt: String) = with(compilationTask) { target = tgt } diff --git a/tools/kotlin-native-gradle-plugin/src/test/groovy/org/jetbrains/kotlin/gradle/plugin/test/IncrementalSpecification.groovy b/tools/kotlin-native-gradle-plugin/src/test/groovy/org/jetbrains/kotlin/gradle/plugin/test/IncrementalSpecification.groovy index c3c66bab840..ca26913737d 100644 --- a/tools/kotlin-native-gradle-plugin/src/test/groovy/org/jetbrains/kotlin/gradle/plugin/test/IncrementalSpecification.groovy +++ b/tools/kotlin-native-gradle-plugin/src/test/groovy/org/jetbrains/kotlin/gradle/plugin/test/IncrementalSpecification.groovy @@ -175,36 +175,6 @@ class IncrementalSpecification extends BaseKonanSpecification { onlyRecompilationHappened(*results) } - def 'manifest parameter change for a compilation task should cause only recompilation'() { - when: - def project = KonanInteropProject.createEmpty(projectDirectory) { KonanInteropProject it -> - it.generateSrcFile('main.kt') - } - def results = buildTwice(project) { KonanInteropProject it -> - def manifest = it.generateSrcFile('manifest', "#some manifest file") - it.addCompilationSetting("main", "manifest", manifest) - } - - then: - onlyRecompilationHappened(*results) - } - - def 'manifest file change should cause only recompilation'() { - when: - def manifest - def project = KonanInteropProject.createEmpty(projectDirectory) { KonanInteropProject it -> - it.generateSrcFile('main.kt') - manifest = it.generateSrcFile('manifest', "#some manifest file\n") - it.addCompilationSetting("main", "manifest", manifest) - } - def results = buildTwice(project) { KonanInteropProject it -> - manifest.append("#something else\n") - } - - then: - onlyRecompilationHappened(*results) - } - @Unroll("#parameter change for an interop task should cause recompilation and interop reprocessing") def 'Parameter change for an interop task should cause recompilation and interop reprocessing'() { when: