Is anyone else using Dagger + Databinding on Andro...
# android
a
Is anyone else using Dagger + Databinding on Android with kapt? We are seeing an issue where the underlying annotation processor exception is not logged to the Gradle console, which makes it really hard to debug the problem. It almost looks like the output is cut off. It seems to stem from an issue where Dagger or databinding encounters a problem while generating code and it logs a large amount of exceptions (one for every layout or DI annotated class). Stack trace:
Copy code
java.lang.IllegalStateException: failed to analyze: org.jetbrains.kotlin.kapt3.diagnostic.KaptError: Error while annotation processing
	at org.jetbrains.kotlin.analyzer.AnalysisResult.throwIfError(AnalysisResult.kt:57)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules(KotlinToJVMBytecodeCompiler.kt:138)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:154)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:58)
...
Caused by: org.jetbrains.kotlin.kapt3.diagnostic.KaptError: Error while annotation processing
	at org.jetbrains.kotlin.kapt3.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:90)
	at org.jetbrains.kotlin.kapt3.AnnotationProcessingKt.doAnnotationProcessing$default(annotationProcessing.kt:42)
...
We have the following in our
build.gradle
, increasing the limit above 500 does not resolve the issue.
Copy code
gradle.projectsEvaluated {
    tasks.withType(JavaCompile) {
        options.compilerArgs << "-Xmaxerrs" << "500"
    }
}

kapt {
    javacOptions {
        option("-Xmaxerrs", 500)
    }
}