Open jjohannes opened 2 months ago
I'm open to any solution to this problem that works and is maintainable. In the past, I considered trying to use a worker action with process isolation; actually I vaguely recall trying this and running into a major issue that felt like a bug in that API.
The reason I'm using a custom classloader here is that i need to "ask" the annotation processor which types it supports.
I think we have pretty good regression tests around this subject, so if you have time, feel free to experiment and see what solves your problem while also keeping the existing tests passing 👍
Is your feature request related to a problem? Please describe.
Right now, if you configure a toolchain with a Java version (e.g. 21) that is higher than the version you run Gradle with (e.g. 17) you may get the following exception for Annotation Processor class files:
https://scans.gradle.com/s/bcxd6sczjyfhk/failure#1
Describe the solution you'd like
The
FindDeclaredProcsTask
task works in the described setup and does not throw.Describe alternatives you've considered
The solution is to run the build itself with a JDK that corresponds to the configured toolchain or is newer.
Additional context
Do you think this can be solved somehow @autonomousapps? If yes, I can attempt to provide a fix.