RFR: CODETOOLS-7903008: JMH: Support incremental annotation processing for Gradle Java plugin
Taylor Wicksell
github.com+301239+twicksell at openjdk.java.net
Thu Aug 5 21:22:40 UTC 2021
On Thu, 10 Jun 2021 17:53:42 GMT, Taylor Wicksell <github.com+301239+twicksell at openjdk.org> wrote:
> This change adds support for Gradle's [incremental annotation processing](https://docs.gradle.org/current/userguide/java_plugin.html#sec:incremental_annotation_processing). Without this support, developers using the JMH annotation processor in their Gradle projects will see their compilation time increased due to Gradle invalidating its incremental compilation cache.
Unfortunately I had to test this manually by performing a `mvn install` of my branch and using that with a couple of my own gradle projects. If you run gradle with `--info` and you will see:
Full recompilation is required because org.openjdk.jmh.generators.BenchmarkProcessor is not incremental. Analysis took 0.085 secs.
After applying this change, you will see:
Created classpath snapshot for incremental compilation in 0.391 secs. 1153 duplicate classes found in classpath (see all with --debug).
I don't have a great way to add a test case to JMH for this, as I suspect you wouldn't want all of those gradle specifics as part of your build. But open to suggestions here.
-------------
PR: https://git.openjdk.java.net/jmh/pull/43
More information about the jmh-dev
mailing list