Output annotation processor fqName if the processor can't be initialized
This commit is contained in:
+2
-2
@@ -41,7 +41,7 @@ public abstract class AnnotationProcessorWrapper(private val processorFqName: St
|
|||||||
private val processor: Processor by Delegates.lazy {
|
private val processor: Processor by Delegates.lazy {
|
||||||
try {
|
try {
|
||||||
val instance = Class.forName(processorFqName).newInstance() as? Processor
|
val instance = Class.forName(processorFqName).newInstance() as? Processor
|
||||||
instance ?: throw IllegalArgumentException("Instance has a wrong type")
|
instance ?: throw IllegalArgumentException("Instance has a wrong type: $processorFqName")
|
||||||
}
|
}
|
||||||
catch (e: Exception) {
|
catch (e: Exception) {
|
||||||
AnnotationProcessorStub()
|
AnnotationProcessorStub()
|
||||||
@@ -88,7 +88,7 @@ public abstract class AnnotationProcessorWrapper(private val processorFqName: St
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun process(annotations: MutableSet<out TypeElement>?, roundEnv: RoundEnvironment): Boolean {
|
override fun process(annotations: MutableSet<out TypeElement>?, roundEnv: RoundEnvironment): Boolean {
|
||||||
roundCounter = roundCounter + 1
|
roundCounter += 1
|
||||||
|
|
||||||
val annotatedKotlinElements = kotlinAnnotationsProvider.annotatedKotlinElements
|
val annotatedKotlinElements = kotlinAnnotationsProvider.annotatedKotlinElements
|
||||||
val roundEnvironmentWrapper = RoundEnvironmentWrapper(processingEnv, roundEnv, roundCounter, annotatedKotlinElements)
|
val roundEnvironmentWrapper = RoundEnvironmentWrapper(processingEnv, roundEnv, roundCounter, annotatedKotlinElements)
|
||||||
|
|||||||
Reference in New Issue
Block a user