diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88887f4b..e8d1fa79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 17 distribution: temurin - name: Publish to Maven Local run: ./gradlew build publishToMavenLocal --stacktrace -PlocalPublish @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 17 distribution: temurin - uses: actions/download-artifact@v4 with: @@ -56,7 +56,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 17 distribution: temurin - name: Publish if: ${{ github.repository_owner == 'wpilibsuite' && startsWith(github.ref, 'refs/tags/v') }} diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index 405a2b30..95cce8ba 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -6,5 +6,5 @@ jobs: name: "Validation" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: gradle/wrapper-validation-action@v1 + - uses: actions/checkout@v4 + - uses: gradle/wrapper-validation-action@v2 diff --git a/README.md b/README.md index 7a8307e0..6eafccba 100644 --- a/README.md +++ b/README.md @@ -131,16 +131,9 @@ plugins { The latest version can be obtained from here: https://plugins.gradle.org/plugin/edu.wpi.first.GradleRIO -## Deploying alternate JRE - -For 2024, JRE 17 is deployed. To use JRE 11 from previous years, do the following: - -1. Add `wpi.jreArtifactLocation = 'edu.wpi.first.jdk:roborio-2021:11.0.9u11-1'` to build.gradle -2. Set `gcType = 'CMS'` in the FRCJavaArtifact block to use the CMS garbage collector - ## Using alternate garbage collector -GradleRIO has built in settings for several different garbage collectors. The CMS garbage collector was used for JDK 11 in 2022 and earlier, but was removed in later JDKs. The G1 Garbage Collector was used for 2023. The Serial Garbage Collector is used for 2024. A list of all Garbage Collectors and settings that GradleRIO has built-in support for setting is available at: https://github.com/wpilibsuite/GradleRIO/blob/main/src/main/java/edu/wpi/first/gradlerio/deploy/roborio/GarbageCollectorType.java. To use another Garbage Collector, in the FRCJavaArtifact block, add `gcType = ` and set it to the value found in the `GarbageCollectorType` enum. +GradleRIO has built in settings for several different garbage collectors. The G1 Garbage Collector was used for 2023. The Serial Garbage Collector is used for 2024. A list of all Garbage Collectors and settings that GradleRIO has built-in support for setting is available at: https://github.com/wpilibsuite/GradleRIO/blob/main/src/main/java/edu/wpi/first/gradlerio/deploy/roborio/GarbageCollectorType.java. To use another Garbage Collector, in the FRCJavaArtifact block, add `gcType = ` and set it to the value found in the `GarbageCollectorType` enum. The `Other` `gcType` can be used for complete customization diff --git a/build.gradle b/build.gradle index 1f383480..f3c582c8 100644 --- a/build.gradle +++ b/build.gradle @@ -38,8 +38,8 @@ base { } java { - sourceCompatibility = 11 - targetCompatibility = 11 + sourceCompatibility = 17 + targetCompatibility = 17 } allprojects { diff --git a/src/main/java/edu/wpi/first/gradlerio/deploy/roborio/GarbageCollectorType.java b/src/main/java/edu/wpi/first/gradlerio/deploy/roborio/GarbageCollectorType.java index f1ccb848..47534244 100644 --- a/src/main/java/edu/wpi/first/gradlerio/deploy/roborio/GarbageCollectorType.java +++ b/src/main/java/edu/wpi/first/gradlerio/deploy/roborio/GarbageCollectorType.java @@ -3,7 +3,6 @@ import java.util.List; public enum GarbageCollectorType { - CMS("-XX:+UseConcMarkSweepGC"), G1("-XX:+UseG1GC", "-XX:MaxGCPauseMillis=1", "-XX:GCTimeRatio=1"), G1_LongPause("-XX:+UseG1GC", "-XX:MaxGCPauseMillis=5", "-XX:GCTimeRatio=1"), G1_Base("-XX:+UseG1GC"), diff --git a/testing/java/build.gradle b/testing/java/build.gradle index 8f9cad2b..ab6d0bc9 100644 --- a/testing/java/build.gradle +++ b/testing/java/build.gradle @@ -11,8 +11,8 @@ if (testingFolder.name != 'testing' || projectFolder.name != 'java') { } java { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } def ROBOT_MAIN_CLASS = "frc.team0000.robot.Main" diff --git a/testing/jni/build.gradle b/testing/jni/build.gradle index 525599e9..f76ed593 100644 --- a/testing/jni/build.gradle +++ b/testing/jni/build.gradle @@ -5,8 +5,8 @@ plugins { id 'edu.wpi.first.GradleJni' version '0.10.1' } -sourceCompatibility = JavaVersion.VERSION_11 -targetCompatibility = JavaVersion.VERSION_11 +sourceCompatibility = JavaVersion.VERSION_17 +targetCompatibility = JavaVersion.VERSION_17 def ROBOT_MAIN_CLASS = "frc.robot.Main" diff --git a/wsl_install_java.sh b/wsl_install_java.sh index 2c1ae2e4..8b960ccf 100755 --- a/wsl_install_java.sh +++ b/wsl_install_java.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -JAVA_REL=11 +JAVA_REL=17 JAVA_HOME="/usr/lib/jvm/java-$JAVA_REL-openjdk-amd64" set -ex