-
Notifications
You must be signed in to change notification settings - Fork 403
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
shadowJar task with minimize() doesn't use gradle toolchain. #1034
Comments
@VasilisManol This looks unrelated to Shadow, can you try out deleting configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_21
} |
@Goooler I get the same even when I comment out that part. Even in that case, it builds without errors, if I just comment out the minimize(). Can you explain why you think it is unrelated to Shadow? For me, the fact that it fails only if I call minimize() but it works otherwise, points to Shadow and actually the implementation of the minimize() feature. |
It's related to |
I see your point but then it should work with your suggestion. I think the issue is that Shadow doesn't use the toolchain defined in
As I wrote my default java on the system is java 8 and this is what Shadow uses. If I set default java to 21 then it works. |
|
Expected and Results
call shadowJar task with minimize() without errors.
Related environent and versions
Gradle 8.6
shadow 8.3.5
Installed JDKs
openjdk 8 - default
openjdk 21
Reproduction steps
Then the following error occurs:
If minimize() is commented out it builds as expected.
Anything else?
This error looks related with #814 but maybe not exactly the same. When switching to jdk21 as default jdk, minimize() doesn't give any error.
The text was updated successfully, but these errors were encountered: