Skip to content

Commit c1420ea

Browse files
Upgrade setup-java GitHub actions to v2 (#7232)
There are two breaking changes between v1 and v2. v2 requires a java distribution be specified. 'adopt' for AdoptOpenJDK has been selected. v2 has also dropped support for legacy Java version syntax, so '1.8' must be become '8'.
1 parent 3dbf37e commit c1420ea

File tree

5 files changed

+23
-18
lines changed

5 files changed

+23
-18
lines changed

.github/workflows/gradle_branch.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v2
16-
- name: Set up JDK 1.8
17-
uses: actions/setup-java@v1
16+
- name: Set up JDK 8
17+
uses: actions/setup-java@v2
1818
with:
19-
java-version: 1.8
19+
distribution: 'adopt'
20+
java-version: '8'
2021
- name: Cache Gradle packages
2122
uses: actions/[email protected]
2223
with:
@@ -28,4 +29,4 @@ jobs:
2829
- name: Build branch without snapshot
2930
run: ./gradlew -PreleaseMode=pr build --stacktrace
3031
- name: Upload to Codecov
31-
uses: codecov/codecov-action@v1
32+
uses: codecov/codecov-action@v1

.github/workflows/gradle_jdk11.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Set up JDK 11
19-
uses: actions/setup-java@v1
19+
uses: actions/setup-java@v2
2020
with:
21-
java-version: 11
21+
distribution: 'adopt'
22+
java-version: '11'
2223
- name: Cache Gradle packages
2324
uses: actions/[email protected]
2425
with:
@@ -30,4 +31,4 @@ jobs:
3031
- name: Build PR
3132
run: ./gradlew -PreleaseMode=pr build --stacktrace
3233
#- name: Upload to Codecov
33-
# uses: codecov/codecov-action@v1
34+
# uses: codecov/codecov-action@v1

.github/workflows/gradle_pr.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v2
16-
- name: Set up JDK 1.8
17-
uses: actions/setup-java@v1
16+
- name: Set up JDK 8
17+
uses: actions/setup-java@v2
1818
with:
19-
java-version: 1.8
19+
distribution: 'adopt'
20+
java-version: '8'
2021
- name: Cache Gradle packages
2122
uses: actions/[email protected]
2223
with:
@@ -28,4 +29,4 @@ jobs:
2829
- name: Build PR
2930
run: ./gradlew -PreleaseMode=pr build --stacktrace
3031
- name: Upload to Codecov
31-
uses: codecov/codecov-action@v1
32+
uses: codecov/codecov-action@v1

.github/workflows/gradle_release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ jobs:
2626
CI_BUILD_NUMBER: ${{ github.run_number }}
2727
steps:
2828
- uses: actions/checkout@v2
29-
- name: Set up JDK 1.8
30-
uses: actions/setup-java@v1
29+
- name: Set up JDK 8
30+
uses: actions/setup-java@v2
3131
with:
32-
java-version: 1.8
32+
distribution: 'adopt'
33+
java-version: '8'
3334
- name: Cache Gradle packages
3435
uses: actions/[email protected]
3536
with:

.github/workflows/gradle_snapshot.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ jobs:
2323
CI_BUILD_NUMBER: ${{ github.run_number }}
2424
steps:
2525
- uses: actions/checkout@v2
26-
- name: Set up JDK 1.8
27-
uses: actions/setup-java@v1
26+
- name: Set up JDK 8
27+
uses: actions/setup-java@v2
2828
with:
29-
java-version: 1.8
29+
distribution: 'adopt'
30+
java-version: '8'
3031
- name: Cache Gradle packages
3132
uses: actions/[email protected]
3233
with:
@@ -42,4 +43,4 @@ jobs:
4243
- name: Upload to Codecov
4344
uses: codecov/codecov-action@v1
4445
- name: Push Javadocs
45-
run: ./push_javadoc.sh
46+
run: ./push_javadoc.sh

0 commit comments

Comments
 (0)