Closed igor-makarov closed 1 year ago
@igor-makarov ok, this is also my bad, I usually never accept pull requests without proper automated tests
Would you be able to add minimal Gradle project to the example/ directory? This will allow to quickly check whether this and any future versions of ClassIndex work correctly with Gradle.
@sentinelt please note I've made an additional change, since apparently having a broad *
supported annotation type makes Gradle think that Lombok annotations may interfere with ClassIndex and Lombok annotations are source-retained, resulting in the following message:
Full recompilation is required because '@AllArgsConstructor' has source retention. Aggregating annotation processors require class or runtime retention.
As to having a sample Gradle project, I would love to, but I don't know how, really - my knowledge is more in the incremental build area, I've stumbled onto Gradle only circumstantially, working on a project I normally do not.
Is it possible that you add it?
@sentinelt I'm sorry again, it appears that I'm in too deep into this incremental annotation processing thing.
Running ClassIndex incrementally with the annotation types constrained, it somehow makes the index be deleted. My guess is something in the runtime environment is different when running incrementally, but this is difficult for me to figure out because my familiarity with Java annotations is very little.
I'm very sorry, again, I think I need to close this. As it now stands, I don't know how to make ClassIndex support incremental Gradle builds.
FYI There seems to be a good impl here but I've got limited comprehension of it.
I can try to analyze it, but I'm not a Gradle user. Would you be able to provide me a minimal example project using ClassIndex in Gradle and some instructions how to check whether incremental compilation works?
@sentinelt I will try, though I'm not really a Gradle user myself 🙃
Seems like there are 2 interrelated problems:
*
match on the annotation type causes the build system to match annotations that are incompatible with an aggregate processor type. There could be two solutions in theory:
I'll try to set up a test project but I'm having trouble linking everything up, and I don't even know how to debug a Gradle build step.
@sentinelt opened https://github.com/atteo/classindex/issues/74
@sentinelt I'm very sorry, but I had the class name wrong!