diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e53ead3..7e1d6c2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,7 +22,7 @@ Thank you for your interest in improving CurveBuilding! Bug reports, feature ide ## Development setup -See [Edit the Code](README.md#edit-the-code) in the README for setting up IntelliJ IDEA and building the Bukkit and Fabric jars. JDK 25 and JDK 21 are required for development: Gradle runs on Java 25, and the jars for older Minecraft versions are compiled with Java 21. +See [Edit the Code](README.md#edit-the-code) in the README for setting up IntelliJ IDEA and building the Bukkit and Fabric jars. Gradle runs on Java 25 and compiles the jars for older Minecraft versions with Java 21. It downloads these JDKs when they are not installed. ## Pull requests diff --git a/README.md b/README.md index 6063ddc..8d77f53 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ If you want to contribute to the CurveBuilding project by adding features, fixin 2. Download and install [IntelliJ IDEA](https://www.jetbrains.com/idea/download/). 3. Install the **Minecraft Development** plugin in IDEA. 4. In the IDEA, open the folder where you saved CurveBuilding's code. This will create a new project in IDEA. -5. Install JDK 25 and JDK 21. Gradle runs on JDK 25 (set in `gradle/gradle-daemon-jvm.properties`) and finds installed JDKs automatically. Set the project SDK version to 25. +5. Install a JDK to start Gradle with. Gradle runs on JDK 25 and compiles the jars for older Minecraft versions with JDK 21; it uses them when they are installed and otherwise downloads them into `~/.gradle/jdks`. Set the project SDK version to 25. All modules are part of a single Gradle build. The Fabric module uses [Stonecutter](https://stonecutter.kikugie.dev/) to build several jars from the same code. Each jar is built against one Minecraft version and can support a range of compatible versions; it has its own project `:curvebuilding-fabric:` with settings in `curvebuilding-fabric/versions//gradle.properties`. Fabric is currently built for Minecraft 1.21 - 1.21.1, 1.21.3 - 1.21.4, 1.21.5 - 1.21.8, 1.21.10, 1.21.11 and 26.1 - 26.3 (one jar for each of these). diff --git a/gradle/gradle-daemon-jvm.properties b/gradle/gradle-daemon-jvm.properties index 5e0c2d8..9228ecb 100644 --- a/gradle/gradle-daemon-jvm.properties +++ b/gradle/gradle-daemon-jvm.properties @@ -1,2 +1,12 @@ -# Gradle itself runs on this Java version (Loom 1.18 requires Java 25). Install a JDK 25 locally. +#This file is generated by :updateDaemonJvm +toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/50d5fe9033e125599b2aa94dc590a27d/redirect +toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/b15e5055c5b0ea5fda57f6fdafe96572/redirect +toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/50d5fe9033e125599b2aa94dc590a27d/redirect +toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b15e5055c5b0ea5fda57f6fdafe96572/redirect +toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/f186cb82baef4a2e7b41b5590f9304fa/redirect +toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/5d8d54de3a467a8da01a32410565830f/redirect +toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/50d5fe9033e125599b2aa94dc590a27d/redirect +toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b15e5055c5b0ea5fda57f6fdafe96572/redirect +toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/e2fccfcc46d573aadfa3c21ecf330564/redirect +toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d0edfb63e02dc58e61e6c804b15e02e8/redirect toolchainVersion=25 diff --git a/settings.gradle b/settings.gradle index 4919520..81385f8 100644 --- a/settings.gradle +++ b/settings.gradle @@ -14,6 +14,10 @@ pluginManagement { plugins { id "dev.kikugie.stonecutter" version "0.9.8" + // Downloads the JDKs that the build needs and does not find: those that the jars are compiled with, and Java 25 for + // Gradle itself, which Loom 1.18 requires. gradle/gradle-daemon-jvm.properties is written by + // `./gradlew updateDaemonJvm --jvm-version=25`. + id "org.gradle.toolchains.foojay-resolver-convention" version "1.0.0" } rootProject.name = "CurveBuilding"