Skip to content

Commit

Permalink
Merge pull request #315 from xuwei-k/jdk-21
Browse files Browse the repository at this point in the history
Update `javacOptions`. add JDK 21 CI
  • Loading branch information
tototoshi authored Jun 30, 2024
2 parents 1ae4476 + 3d8f7a7 commit e1ae1cd
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 e1ae1cd

Please sign in to comment.