Change retention of AutoAnnotation to CLASS to make it compatible with Gradle incremental compiler
asodja opened this issue · comments
We got a report that "isolating" processors might not produce correct results when combined with "aggregating" processors with the Gradle incremental compilation. In case the "isolating" processor and "aggregating" processor work on the same type, then all annotations have to have CLASS
or RUNTIME
retention, and not just SOURCE
. This is a rare case that was forgotten when documentation was written. Check for details: gradle/gradle#19366.
We noticed that one of your annotations is using SOURCE
retention:
auto/value/src/main/java/com/google/auto/value/AutoAnnotation.java
Lines 109 to 111 in 9f01954
So to be 100% compatible with the Gradle incremental compilation, you should change that to CLASS
retention.
This looks like an oversight. The other annotations in the same package have all moved from SOURCE
to CLASS
retention over time, but this one was missed.