Filter kapt generate stubs classpath for non-existent entries (KT-37241)
Issue #KT-37241 Fixed
This commit is contained in:
+4
-1
@@ -541,7 +541,7 @@ open class Kapt3IT : Kapt3BaseIT() {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testKt19179() {
|
||||
fun testKt19179andKt37241() {
|
||||
val project = Project("kt19179", directoryPrefix = "kapt2")
|
||||
|
||||
project.build("build") {
|
||||
@@ -565,6 +565,9 @@ open class Kapt3IT : Kapt3BaseIT() {
|
||||
":app:kaptGenerateStubsKotlin",
|
||||
":app:kaptKotlin"
|
||||
)
|
||||
|
||||
// Test for KT-37241, check the that non-existent classpath entry is filtered out:
|
||||
assertNotContains("Classpath entry points to a non-existent location")
|
||||
}
|
||||
|
||||
project.projectDir.getFileByName("Test.kt").modify { text ->
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'java-library'
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ open class KaptGenerateStubsTask : KotlinCompile() {
|
||||
args.pluginOptions = (pluginOptionsWithKapt.arguments + args.pluginOptions!!).toTypedArray()
|
||||
|
||||
args.verbose = project.hasProperty("kapt.verbose") && project.property("kapt.verbose").toString().toBoolean() == true
|
||||
args.classpathAsList = this.compileClasspath.toList()
|
||||
args.classpathAsList = this.compileClasspath.filter { it.exists() }.toList()
|
||||
args.destinationAsFile = this.destinationDir
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user