Status Update
Comments
xa...@google.com <xa...@google.com> #2
This outputs a verbose, misleading warning. We should consider fixing this in 8.3/8.4.
xa...@google.com <xa...@google.com> #3
Ivan, can you look or investigate since Hung is out, especially with current timing on 8.4
ga...@google.com <ga...@google.com> #4
To summarize, the issue happens when there is e.g.:
dependencies {
ksp("com.foo:bar:1.0")
where resolving ksp configuration we get baz.jar
which contains the META-INF/services/javax.annotation.processing.Processor
file. This processor will not be used for running annotation processing with javac, but it will be reported as non-incremental.
ga...@google.com <ga...@google.com> #5
This will be fixed in the next AGP 8.5.0 canary version.
change-id: Iac5cbb1efe49783d72a0ebcfb857a0c2badb4e06
an...@google.com <an...@google.com> #6
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Koala | 2024.1.1 Canary 5
- Android Gradle Plugin 8.5.0-alpha05
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
The
JavaPreCompileTask
computes KSP and annotation processors that are consumed in downstreamJavaCompile
tasks. For annotation processors, the compilation task in AGP computes if any processors are non-incremental, and (correctly) reports a warning for any non-incremental processors found.However, there's a bug in
JavaPreCompileTask
's logic as it merges the KSP and annotation processing classpath when computing, meaning that dependencies on the KSP classpath are incorrectly treated as if they are going to be on the JavaCompileannotationProcessorClasspath
.Essentially, in this bit of logic
It shouldn't be merging together the ksp and annotation processor artifacts, as KSP dependencies do not participate in the
JavaCompile
classpath.In the meantime, I can work around this with the following snippet in Kotlin gradle DSL.