Skip to content

Commit

Permalink
Specify Java 21 using asdf's .tool-versions
Browse files Browse the repository at this point in the history
This is motivated by guardian/gha-scala-library-release-workflow#31 -
initially I was just thinking about updating to Java 21, but now I think
that making projects declare which Java version they use to build is
probably a good thing!

Note that we're using asdf's .tool-versions file here, which has recently gained
support in actions/setup-java#606 - this means that
we can also get _all_ our GitHub Actions files to respect the Java version
definied in that file - eg, we can reference it in ci.yml, and we don't need
to update Java version in there anymore.
  • Loading branch information
rtyley committed Mar 14, 2024
1 parent 1825fd8 commit 496805c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Expand Up @@ -14,12 +14,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17 # Currently Java 17 required by `s3mock-testcontainers`
java-version-file: .tool-versions
cache: sbt
- name: Build and Test
run: sbt -v +test
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
@@ -0,0 +1 @@
java corretto-21.0.2.13.1

0 comments on commit 496805c

Please sign in to comment.