KT-9003 FileNotFoundException when Kapt is unable to find corresponding annotations.txt
#KT-9003 Fixed
This commit is contained in:
committed by
Yan Zhulanow
parent
01b2d02196
commit
69038ba6c0
+7
-9
@@ -81,16 +81,14 @@ public abstract class AnnotationProcessorWrapper(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
val annotationsFile = processingEnv.getOptions().get(KAPT_ANNOTATION_OPTION)
|
val annotationsFilePath = processingEnv.getOptions().get(KAPT_ANNOTATION_OPTION)
|
||||||
if (annotationsFile != null) {
|
val annotationsFile = if (annotationsFilePath != null) File(annotationsFilePath) else null
|
||||||
try {
|
kotlinAnnotationsProvider = if (annotationsFile != null && annotationsFile.exists()) {
|
||||||
kotlinAnnotationsProvider = FileKotlinAnnotationProvider(File(annotationsFile))
|
FileKotlinAnnotationProvider(annotationsFile)
|
||||||
}
|
}
|
||||||
catch (e: IOException) {
|
else {
|
||||||
kotlinAnnotationsProvider = EmptyKotlinAnnotationsProvider()
|
EmptyKotlinAnnotationsProvider()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else kotlinAnnotationsProvider = EmptyKotlinAnnotationsProvider()
|
|
||||||
|
|
||||||
processor.init(processingEnv)
|
processor.init(processingEnv)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user