mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 18:06:45 +00:00
make it clear that Java 21 is supported
Update examples and references to Java where older Java versions are used to highlight the support of Java 21. Specific provider examples are only updated where they support Java 21. Fixes #557
This commit is contained in:
parent
16ef37f8dd
commit
207a22c019
2 changed files with 24 additions and 19 deletions
18
README.md
18
README.md
|
@ -73,7 +73,7 @@ steps:
|
|||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||
java-version: '17'
|
||||
java-version: '21'
|
||||
- run: java HelloWorldApp.java
|
||||
```
|
||||
|
||||
|
@ -84,13 +84,13 @@ steps:
|
|||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'zulu' # See 'Supported distributions' for available options
|
||||
java-version: '17'
|
||||
java-version: '21'
|
||||
- run: java HelloWorldApp.java
|
||||
```
|
||||
|
||||
#### Supported version syntax
|
||||
The `java-version` input supports an exact version or a version range using [SemVer](https://semver.org/) notation:
|
||||
- major versions: `8`, `11`, `16`, `17`
|
||||
- major versions: `8`, `11`, `16`, `17`, `21`
|
||||
- more specific versions: `17.0`, `11.0`, `11.0.4`, `8.0.232`, `8.0.282+8`
|
||||
- early access (EA) versions: `15-ea`, `15.0.0-ea`, `15.0.0-ea.2`, `15.0.0+2-ea`
|
||||
|
||||
|
@ -135,7 +135,7 @@ steps:
|
|||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
java-version: '21'
|
||||
cache: 'gradle'
|
||||
cache-dependency-path: | # optional
|
||||
sub-project/*.gradle*
|
||||
|
@ -150,7 +150,7 @@ steps:
|
|||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
java-version: '21'
|
||||
cache: 'maven'
|
||||
cache-dependency-path: 'sub-project/pom.xml' # optional
|
||||
- name: Build with Maven
|
||||
|
@ -164,7 +164,7 @@ steps:
|
|||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
java-version: '21'
|
||||
cache: 'sbt'
|
||||
cache-dependency-path: | # optional
|
||||
sub-project/build.sbt
|
||||
|
@ -184,7 +184,7 @@ steps:
|
|||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
java-version: '21'
|
||||
cache: 'gradle'
|
||||
- run: ./gradlew build --no-daemon
|
||||
```
|
||||
|
@ -204,7 +204,7 @@ steps:
|
|||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
java-version: '21'
|
||||
check-latest: true
|
||||
- run: java HelloWorldApp.java
|
||||
```
|
||||
|
@ -216,7 +216,7 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
java: [ '8', '11', '17' ]
|
||||
java: [ '8', '11', '17', '21' ]
|
||||
name: Java ${{ matrix.Java }} sample
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue