Skip to content

[#2504] Support Gradle incremental annotation processing - #2530

Open
tanvir-ux wants to merge 1 commit into
remkop:mainfrom
tanvir-ux:feature/2504-gradle-incremental-annotation-processing
Open

tanvir-ux wants to merge 1 commit into
remkop:mainfrom
tanvir-ux:feature/2504-gradle-incremental-annotation-processing

Conversation

@tanvir-ux

Copy link
Copy Markdown

Fixes #2504.

picocli-codegen never opted into Gradle incremental annotation processing, so Gradle treated it as non-incremental and recompiled everything whenever the processor ran.

The processor is registered as dynamic:

  • aggregating (default): reflect-config.json / resource-config.json / proxy-config.json are each built from every @Command in the compilation (multiple originating elements, Filer + CLASS_OUTPUT). Isolating would be incorrect here.
  • isolating: only when disable.reflect.config, disable.resource.config, and disable.proxy.config are all set, so no GraalVM files are written and the processor only validates annotations.

A full Gradle TestKit incremental compile is not in this repo (would need a sample Gradle consumer and TestKit). Coverage is the Gradle descriptor plus getSupportedOptions() resolving to the right category, including the mixed-disable case that must stay aggregating.

…processing

Register the processor as dynamic: aggregating when GraalVM config files
are generated, isolating when all generators are disabled.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Gradle incremental annotation processing

1 participant