Skip to content

Commit

Permalink
Build fully on Java 17, closes #2670 (#2676)
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 authored Sep 14, 2021
1 parent a0592ba commit b23b7c6
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 29 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@ jobs:
build:
strategy:
matrix:
java: [16-jdk]
java: [17-jdk]
runs-on: ubuntu-20.04
container:
image: openjdk:${{ matrix.java }}
options: --user root
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- run: |
curl https://maven.fabricmc.net/net/java/jdk/openjdk-17-ea%2B24_linux-x64_bin.tar.gz --output java.tar.gz
tar -xf java.tar.gz
- run: ./gradlew build javadocJar checkMappings --stacktrace -Porg.gradle.java.installations.auto-download=false -Porg.gradle.java.installations.paths=$(pwd)/jdk-17
- run: ./gradlew build javadocJar checkMappings --stacktrace
- name: Build artifacts
if: ${{ matrix.java == '16-jdk' }}
continue-on-error: true
Expand Down
18 changes: 3 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
name: Publish
on: [push]
concurrency: ci-${{ github.ref }}
jobs:
build:
runs-on: ubuntu-20.04
container:
image: openjdk:16-jdk
image: openjdk:17-jdk
options: --user root
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1

# Ensure that releases are not ran in parallel, this ensures that the latest commit is the latest release
# See https://github.com/softprops/turnstyle
- name: Turnstyle
uses: softprops/turnstyle@v1
with:
continue-after-seconds: 3600
same-branch-only: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Generate the build number based on tags to allow per branch build numbers, not something github provides by default.
- name: Generate build number
id: buildnumber
Expand All @@ -28,10 +19,7 @@ jobs:
token: ${{ secrets.github_token }}
prefix: ${{ github.ref }}

- run: |
curl https://maven.fabricmc.net/net/java/jdk/openjdk-17-ea%2B24_linux-x64_bin.tar.gz --output java.tar.gz
tar -xf java.tar.gz
- run: ./gradlew build javadocJar checkVersion publish --stacktrace -Porg.gradle.java.installations.auto-download=false -Porg.gradle.java.installations.paths=$(pwd)/jdk-17
- run: ./gradlew build javadocJar checkVersion publish --stacktrace
env:
MAVEN_URL: ${{ secrets.MAVEN_URL }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
Expand Down
7 changes: 0 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -827,13 +827,6 @@ javadoc {
group = "javadoc generation"
outputs.upToDateWhen { false }

if (ENV.CI) {
// Java 17 is provided on CI to build the javadocs with, see https://github.com/FabricMC/yarn/issues/2429
javadocTool = javaToolchains.javadocToolFor {
languageVersion = JavaLanguageVersion.of(17)
}
}

def mappingPoetJar = project.provider { zipTree configurations.mappingPoetJar.singleFile }

failOnError = false
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ case "`uname`" in
Darwin* )
darwin=true
;;
MINGW* )
MSYS* | MINGW* )
msys=true
;;
NONSTOP* )
Expand Down

0 comments on commit b23b7c6

Please sign in to comment.