-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
gradle: Decouple from JDK 8 and support Java Toolchains #119444
Conversation
8f5b126
to
8b290dd
Compare
8b290dd
to
f42d55d
Compare
f42d55d
to
70c3509
Compare
This comment has been minimized.
This comment has been minimized.
You can ping me if you have a question but it can take me a few days to answer if you are unlucky.
ofborg is red because something does not eval correct. I don't really know why from ofborgs log. Maybe |
f7a6205
to
285aab5
Compare
This comment has been minimized.
This comment has been minimized.
ofborg has a different opinion on that. I am not sure why it fails now but I assume the variable is not a derivation but I can't really help your with that. |
I marked this as stale due to inactivity. → More info |
285aab5
to
51734b1
Compare
620909a
to
3f2954e
Compare
jdk8
and support Java Toolchains
jdk8
and support Java Toolchains66f249b
to
4cf151d
Compare
Pinging @tadfisher to review with respect to
|
4cf151d
to
01f4c7e
Compare
let | ||
gradle = (gradleGen.override (old: { java = jdk11; })).gradle_6_9; | ||
gradle = gradle_6; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleting this override is okay, because gradle_6
now uses jdk11
by default.
let | ||
# The default one still uses jdk8 (#89731) | ||
gradle = (gradleGen.override (old: { java = jdk; })).gradle_latest; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleting this override is okay, because gradle
(which is the latest Gradle) currently uses jdk17
, which is currently equal to jdk
, by default.
Reminder: Please review! This Pull Request is awaiting review. If you are the assigned reviewer, please have a look. Try to find another reviewer if necessary. If you can't, please say so. If the status is not accurate, please change it. If nothing happens, this PR Note: This feature is currently broken. The bot will not actually change the status. If you see this message multiple times, please request a status change manually. |
It looks like all concerns have been addressed. If any remain they can be fixed in post. |
The PR NixOS#119444 broke the build for mindustry even further. This patch fixes that again so it evals and builds properly.
The PR NixOS#119444 broke the build for mindustry even further. This patch fixes that again so it evals and builds properly.
This PR completely broke the |
@Profpatsch yes. I did not understand that this PR would break |
@lorenzleutgeb What's the proper way to use { jdk }:
{
packageOverrides = p: {
gradle = (p.gradleGen.override {
java = p.${jdk};
}).gradle_latest;
};
} |
@coderfromhere Very sorry to take so long to reply. Instead of using (self: super: {
gradle = super.gradle.override { inherit java; };
}) The above example requires a variable (self: super: {
gradle = super.gradle.override { java = super.jdk8; };
}) See also the arguments here. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/auto-detecting-java-installations/4677/9 |
This sets a default Java installation per Gradle version, and allows to specify Java Toolchains.
defaultJava
gradle_7
jdk8
gradle_6
jdk11
gradle_5
jdk11
gradle_4
jdk8
(see also Gradle's Compatibility Matrix)
E.g. with
gradle_7.override { javaToolchains = [ jdk8 jdk11 ]; }
I get