-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make FindDeclaredProcsTask use the JDK of the configured Java toolchain to load classes #1167
Comments
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.
The text was updated successfully, but these errors were encountered: