diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0869fe2bd..b3cfbe823 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -60,11 +60,11 @@ jobs: - name: Fetch tags run: git fetch --tags --force - # Install Java 11. - - name: Install Java 11 + # Install Java 17. + - name: Install Java 17 uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 distribution: temurin # Need to publish to maven local first, so that C++ sim can pick it up @@ -103,11 +103,11 @@ jobs: - name: Fetch tags run: git fetch --tags --force - # Install Java 11. - - name: Install Java 11 + # Install Java 17. + - name: Install Java 17 uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 distribution: temurin # Run only build tasks, no checks?? @@ -181,10 +181,10 @@ jobs: with: fetch-depth: 0 - # Install Java 11. + # Install Java 17. - uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 distribution: temurin # Check server code with Spotless. @@ -215,7 +215,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 distribution: temurin - run: git fetch --tags --force - run: | @@ -337,10 +337,10 @@ jobs: with: fetch-depth: 0 - # Install Java 11. + # Install Java 17. - uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 distribution: temurin # Clear any existing web resources. diff --git a/photon-lib/build.gradle b/photon-lib/build.gradle index 046218f67..631be2778 100644 --- a/photon-lib/build.gradle +++ b/photon-lib/build.gradle @@ -16,6 +16,9 @@ test { useJUnitPlatform() } +sourceCompatibility = JavaVersion.VERSION_11 +targetCompatibility = JavaVersion.VERSION_11 + wpilibTools.deps.wpilibVersion = wpilibVersion println("Buidling for wpilib ${wpilibTools.deps.wpilibVersion}") diff --git a/photon-targeting/build.gradle b/photon-targeting/build.gradle index 988e087b9..ec3d4935d 100644 --- a/photon-targeting/build.gradle +++ b/photon-targeting/build.gradle @@ -2,9 +2,6 @@ apply plugin: "java" apply from: "${rootDir}/shared/common.gradle" -sourceCompatibility = 11 -targetCompatibility = 11 - dependencies { implementation wpilibTools.deps.wpilibJava("wpimath") implementation "org.ejml:ejml-simple:0.41" diff --git a/shared/common.gradle b/shared/common.gradle index dfdf5fa48..2b8a765bc 100644 --- a/shared/common.gradle +++ b/shared/common.gradle @@ -6,7 +6,10 @@ import java.time.format.DateTimeFormatter apply plugin: "jacoco" apply plugin: "java" -sourceCompatibility = 11 +java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 +} wpilibTools.deps.wpilibVersion = wpilibVersion