Skip to content

Commit

Permalink
Merge branch 'main' into rebuildtestproj
Browse files Browse the repository at this point in the history
  • Loading branch information
spacey-sooty authored Sep 7, 2024
2 parents a66f0ee + 92c5dc2 commit b6c645e
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ base {
}

java {
sourceCompatibility = 11
targetCompatibility = 11
sourceCompatibility = 17
targetCompatibility = 17
}

allprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
4 changes: 2 additions & 2 deletions testing/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions testing/jni/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion wsl_install_java.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit b6c645e

Please sign in to comment.