Skip to content

Commit

Permalink
Build javadoc with JDK 17 to fix #2429 (#2445)
Browse files Browse the repository at this point in the history
Co-authored-by: liach <[email protected]>
  • Loading branch information
modmuss50 and liach authored May 29, 2021
1 parent fa70358 commit 05c8aac
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- run: ./gradlew build javadocJar checkMappings --stacktrace
- 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
- name: Build artifacts
if: ${{ matrix.java == '15-jdk' }}
if: ${{ matrix.java == '16-jdk' }}
continue-on-error: true
uses: actions/upload-artifact@v2
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ jobs:
token: ${{ secrets.github_token }}
prefix: ${{ github.ref }}

- run: ./gradlew build javadocJar checkVersion publish --stacktrace
- 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
env:
MAVEN_URL: ${{ secrets.MAVEN_URL }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
Expand Down
7 changes: 7 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,13 @@ 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

0 comments on commit 05c8aac

Please sign in to comment.