Filter out non-existent java source roots in kapt tasks
#KT-24716 fixed
This commit is contained in:
+3
-1
@@ -22,4 +22,6 @@ dependencies {
|
||||
compile "org.jetbrains.kotlin:annotation-processor-example:$kotlin_version"
|
||||
kapt "org.jetbrains.kotlin:annotation-processor-example:$kotlin_version"
|
||||
testCompile 'junit:junit:4.12'
|
||||
}
|
||||
}
|
||||
|
||||
compileKotlin.kotlinOptions.allWarningsAsErrors = true
|
||||
+2
-1
@@ -74,6 +74,7 @@ abstract class KaptTask : ConventionTask() {
|
||||
.filterTo(HashSet(), ::isRootAllowed)
|
||||
|
||||
private fun isRootAllowed(file: File): Boolean =
|
||||
!FileUtil.isAncestor(destinationDir, file, /* strict = */ false) &&
|
||||
file.exists() &&
|
||||
!FileUtil.isAncestor(destinationDir, file, /* strict = */ false) &&
|
||||
!FileUtil.isAncestor(classesDir, file, /* strict = */ false)
|
||||
}
|
||||
Reference in New Issue
Block a user