Fix disabling IC not applied to kapgGenerateStubsKotlin tasks
Issue #KT-18647 Fixed (cherry picked from commit ffb656a)
This commit is contained in:
+11
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.gradle
|
||||
|
||||
import org.jetbrains.kotlin.gradle.tasks.USING_INCREMENTAL_COMPILATION_MESSAGE
|
||||
import org.jetbrains.kotlin.gradle.util.*
|
||||
import org.junit.Test
|
||||
import java.io.File
|
||||
@@ -115,6 +116,16 @@ open class Kapt3IT : Kapt3BaseIT() {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDisableIcForGenerateStubs() {
|
||||
val project = Project("simple", GRADLE_VERSION, directoryPrefix = "kapt2")
|
||||
project.build("build", options = defaultBuildOptions().copy(incremental = false)) {
|
||||
assertSuccessful()
|
||||
assertContains(":kaptGenerateStubsKotlin")
|
||||
assertNotContains(USING_INCREMENTAL_COMPILATION_MESSAGE)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testArguments() {
|
||||
Project("arguments", GRADLE_VERSION, directoryPrefix = "kapt2").build("build") {
|
||||
|
||||
+1
@@ -306,6 +306,7 @@ class Kapt3KotlinGradleSubplugin : KotlinGradleSubplugin<KotlinCompile> {
|
||||
kaptTask.destinationDir = getKaptIncrementalDataDir()
|
||||
kaptTask.mapClasspath { kotlinCompile.classpath }
|
||||
kaptTask.generatedSourcesDir = sourcesOutputDir
|
||||
mapKotlinTaskProperties(project, kaptTask)
|
||||
|
||||
buildAndAddOptionsTo(kaptTask.pluginOptions, aptMode = "stubs")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user