[PR #262] [CLOSED] Add Gradle toolchain support #484

Closed
opened 2025-12-30 01:24:53 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/262
Author: @StefMa
Created: 2/28/2024
Status: Closed

Base: mainHead: gradle-toolchain


📝 Commits (7)

  • ff11f54 Add Gradle toolchain support
  • 0371c2f Move toolchain version and vendor to single place and make them configurable
  • 2921b89 Update development.adoc
  • cffa8e0 Fix CI job
  • 5b2e95b Update CI config
  • 8338c17 Remove unnecessary conversion
  • ad5df18 Set javaLauncher for JavaExec tasks

📊 Changes

12 files changed (+54 additions, -38 deletions)

View changed files

📝 .circleci/config.pkl (+2 -2)
📝 .circleci/config.yml (+3 -3)
📝 .circleci/jobs/GradleCheckJob.pkl (+3 -3)
📝 DEVELOPMENT.adoc (+0 -2)
📝 buildSrc/build.gradle.kts (+1 -14)
buildSrc/src/main/kotlin/JvmToolchain.kt (+13 -0)
📝 buildSrc/src/main/kotlin/pklAllProjects.gradle.kts (+0 -7)
📝 buildSrc/src/main/kotlin/pklFatJar.gradle.kts (+9 -2)
📝 buildSrc/src/main/kotlin/pklJavaLibrary.gradle.kts (+9 -0)
📝 buildSrc/src/main/kotlin/pklKotlinLibrary.gradle.kts (+5 -0)
📝 buildSrc/src/main/kotlin/pklKotlinTest.gradle.kts (+5 -0)
📝 settings.gradle.kts (+4 -5)

📄 Description

fixes #184

With that we can get rid of the java 11 check and the information around it.
Also, we can "on the fly" update the jdk version the project will build on.
We only need "a" java version installed to start Gradle.

As discussed in the ticket, I also had to update Gradle to version 7.6 which (seems) brings flaky tests.
But we can't use toolchains before that version.
So maybe this PR wil hang here until this is fixed 🙃

Questions / Todos

Let me know if there is more like these 🙃


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/apple/pkl/pull/262 **Author:** [@StefMa](https://github.com/StefMa) **Created:** 2/28/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `gradle-toolchain` --- ### 📝 Commits (7) - [`ff11f54`](https://github.com/apple/pkl/commit/ff11f543310422c51d9e68c1011f57f01ff41f1c) Add Gradle toolchain support - [`0371c2f`](https://github.com/apple/pkl/commit/0371c2ff0e991263f4c13fc9dca27310685f09a0) Move toolchain version and vendor to single place and make them configurable - [`2921b89`](https://github.com/apple/pkl/commit/2921b89e4d6785bada73e3fdb59369342153e6ff) Update development.adoc - [`cffa8e0`](https://github.com/apple/pkl/commit/cffa8e05a079209f7d83640dd30a5fe31ef4851e) Fix CI job - [`5b2e95b`](https://github.com/apple/pkl/commit/5b2e95b4b3a01280f69930dc43d087242ffcbbc5) Update CI config - [`8338c17`](https://github.com/apple/pkl/commit/8338c17e6eb496616d659f2be46d05fdd4d2050f) Remove unnecessary conversion - [`ad5df18`](https://github.com/apple/pkl/commit/ad5df187ab28698ccb992a8724455e8fd3f5c3dc) Set javaLauncher for JavaExec tasks ### 📊 Changes **12 files changed** (+54 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `.circleci/config.pkl` (+2 -2) 📝 `.circleci/config.yml` (+3 -3) 📝 `.circleci/jobs/GradleCheckJob.pkl` (+3 -3) 📝 `DEVELOPMENT.adoc` (+0 -2) 📝 `buildSrc/build.gradle.kts` (+1 -14) ➕ `buildSrc/src/main/kotlin/JvmToolchain.kt` (+13 -0) 📝 `buildSrc/src/main/kotlin/pklAllProjects.gradle.kts` (+0 -7) 📝 `buildSrc/src/main/kotlin/pklFatJar.gradle.kts` (+9 -2) 📝 `buildSrc/src/main/kotlin/pklJavaLibrary.gradle.kts` (+9 -0) 📝 `buildSrc/src/main/kotlin/pklKotlinLibrary.gradle.kts` (+5 -0) 📝 `buildSrc/src/main/kotlin/pklKotlinTest.gradle.kts` (+5 -0) 📝 `settings.gradle.kts` (+4 -5) </details> ### 📄 Description fixes #184 With that we can get rid of the java 11 check and the information around it. Also, we can "on the fly" update the jdk version the project will build on. We only need "a" java version installed to start Gradle. As discussed in the ticket, I also had to update Gradle to version 7.6 which (seems) brings flaky tests. But we can't use toolchains before that version. So maybe this PR wil hang here until this is fixed 🙃 Questions / Todos * I guess this is not going to work anymore (or has to be adjusted) 👉 https://github.com/apple/pkl/blob/2499e2c4937fc228e49e94e41fdaac065c203168/.circleci/config.pkl#L98C7-L107 * I guess this is not going to work anymore (or has to be adjusted) 👉 https://github.com/apple/pkl/blob/2499e2c4937fc228e49e94e41fdaac065c203168/patches/graalVm23.patch#L25-L30 Let me know if there is more like these 🙃 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 01:24:53 +01:00
adam closed this issue 2025-12-30 01:24:53 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#484