Skip to content

Support for Gradle incremental annotation processing #2504

Description

@Vampire

Currently, the annotation processor does not support Gradle incremental annotation processing.

This means, whenever the annotation processor is used, Gradle always has to either compile no file or all files,
while Gradle could recompile only the changed and dependent files.

For this to work, the annotation processor must opt-in to supporting Gradle incremental annotation processing.

You can find more information about this at https://docs.gradle.org/current/userguide/java_plugin.html#sec:incremental_annotation_processing

I did not analyze the annotation processor code, so I don't know whether the restrictions are fulfilled or not,
but I hope they are or it could be changed to adhere to the limitations.

From a cursory look, I'd say the annotation processor can operate in both modes, so will probably be registered as dynamic and determine at runtime whether it is isolating or aggregating.

Because as far as I understood from a cursory look, the validation logic is isolating while the GraalVM file generation is aggregating.

As I don't use GrallVM I have those three disable-options set so that those files are not generated and only the validations run.

So if my assumptions are right, it would be nice if the annotation processor would support isolating mode if possible and aggregating mode otherwise, so that incremental compilation in Gradle can work even with the annotation processor enabled.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions