Skip to content

Corretto{11,17,21}: update to latest release & build with Gradle8#459071

Merged
thiagokokada merged 3 commits intoNixOS:masterfrom
rollf:corretto-updates
Dec 18, 2025
Merged

Corretto{11,17,21}: update to latest release & build with Gradle8#459071
thiagokokada merged 3 commits intoNixOS:masterfrom
rollf:corretto-updates

Conversation

@rollf
Copy link
Copy Markdown
Contributor

@rollf rollf commented Nov 6, 2025

This PR updates corretto{11,17,21} to their respective latest versions. Currently, corretto builds fail because Gradle7 is EOL'ed and not supported in nixpkgs anymore. Thus, this PR also converts corretto builds to Gradle8.

Upstream does not plan to support Gradle8 for corretto <=21. I have created patches for each corretto version that allow to build with Gradle8. Unfortunately, the patches differ so we now have 3 of them. The patches are based on the changes in corretto/corretto-jdk#135 (actual commit) but did not apply cleanly. I have manually fixed remaining issues and used only the minimal diff (of the original commit) for my patches. The actual diff to review is 3x the 10 similar lines for each corretto version. The 990+ lines in the diff stem from the patches.

I also tried to corretto25: init at 25.0.1.9.1 but that build failed and I haven't yet looked into it. I decided to keep this PR smaller for now.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

rollf added 3 commits November 4, 2025 22:25
Gradle7 is phased out in nixpkgs but corretto <= 21 does not support
Gradle8. See corretto/corretto-21#114 (comment).
Hence, ./corretto21-gradle8.patch is added. This patch is loosely based
on corretto/corretto-jdk#135.
Gradle7 is phased out in nixpkgs but corretto <= 21 does not support
Gradle8. See corretto/corretto-21#114 (comment).
Hence, ./corretto17-gradle8.patch is added. This patch is loosely based
on corretto/corretto-jdk#135.
Gradle7 is phased out in nixpkgs but corretto <= 21 does not support
Gradle8. See corretto/corretto-21#114 (comment).
Hence, ./corretto11-gradle8.patch is added. This patch is loosely based
on corretto/corretto-jdk#135.
@rollf rollf changed the title Corretto updates Corretto{11,17,21}: update to latest release & build with Gradle8 Nov 6, 2025
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 6.topic: java Including JDK, tooling, other languages, other VMs labels Nov 6, 2025
@rollf rollf marked this pull request as ready for review November 6, 2025 08:30
@rollf rollf requested review from Infinidoge and emilazy November 6, 2025 08:30
@rollf rollf mentioned this pull request Nov 6, 2025
45 tasks
@rollf rollf requested a review from tomodachi94 November 14, 2025 05:07
@rollf
Copy link
Copy Markdown
Contributor Author

rollf commented Nov 25, 2025

@emilazy Could you have a look here, please? (You reviewed my previous work on Corretto.)

@rollf
Copy link
Copy Markdown
Contributor Author

rollf commented Dec 5, 2025

@Artturin Do you mind having a look? You reviewed some of my previous work for corretto, too.

@rollf
Copy link
Copy Markdown
Contributor Author

rollf commented Dec 16, 2025

@thiagokokada Could you have a look here, please? (You reviewed my previous work on Corretto.)

Copy link
Copy Markdown
Contributor

@thiagokokada thiagokokada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I don't like the fact that we need to patch the build scripts manually but the code change itself looks trivial.

@thiagokokada thiagokokada added this pull request to the merge queue Dec 18, 2025
Merged via the queue into NixOS:master with commit 450a2dd Dec 18, 2025
44 of 46 checks passed
@rollf
Copy link
Copy Markdown
Contributor Author

rollf commented Dec 19, 2025

LGTM, I don't like the fact that we need to patch the build scripts manually but the code change itself looks trivial.

Cool, thanks! I don't like this neither but I felt it was acceptable since we rather quickly remove old(er) Java versions so these patches will fade out just naturally.

Thanks for merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: java Including JDK, tooling, other languages, other VMs 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants