Skip to content

Commit

Permalink
Update javacOptions. add JDK 21 CI
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Jun 30, 2024
1 parent 7e417de commit 3d8f7a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,20 @@ jobs:
matrix:
include:
- java: 8
- java: 11
- java: 21
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
java-version: ${{matrix.java}}
distribution: adopt
- uses: coursier/cache-action@v6
- run: sbt -v "+ Test/compile" checkScalariform "+ test"
- run: |
set -eux
case "${{ matrix.java }}" in
21)
sbt -v '++ 2.12.x' test '++ 2.13.x' test '++ 3.x' test
;;
*)
sbt -v "+ Test/compile" checkScalariform "+ test"
esac
7 changes: 1 addition & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,7 @@ compile / javacOptions ++= {
case Some((2, v)) if v <= 11 =>
Seq("-target", "6", "-source", "6")
case _ =>
if (scala.util.Properties.isJavaAtLeast("9")) {
// if Java9
Nil
} else {
Seq("-target", "8")
}
Seq("-target", "8", "-source", "8")
}
}

Expand Down

0 comments on commit 3d8f7a7

Please sign in to comment.