Skip to content

Commit f58c8d5

Browse files
authored
Merge pull request #252 from xuwei-k/sbt-2-0-0-RC9
sbt 2.0.0-RC9
2 parents c6ebdb0 + b62657f commit f58c8d5

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
distribution: zulu
1717
jobtype: 1
1818
- os: ubuntu-latest
19-
java: 11
19+
java: 17
2020
distribution: zulu
2121
jobtype: 2
2222
runs-on: ${{ matrix.os }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: actions/setup-java@v5
2222
with:
2323
distribution: temurin
24-
java-version: 11
24+
java-version: 17
2525
cache: sbt
2626
- uses: sbt/setup-sbt@v1
2727
- name: Release

build.sbt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
lazy val scala212 = "2.12.18"
2-
lazy val scala3 = "3.7.3"
2+
lazy val scala3 = "3.8.1"
33
ThisBuild / scalaVersion := scala212
44
ThisBuild / crossScalaVersions := Seq(scala212, scala3)
55

@@ -23,12 +23,12 @@ lazy val plugin = project
2323
(pluginCrossBuild / sbtVersion) := {
2424
scalaBinaryVersion.value match {
2525
case "2.12" => "1.9.0"
26-
case _ => "2.0.0-RC6"
26+
case _ => "2.0.0-RC9"
2727
}
2828
},
2929
scalacOptions ++= {
3030
Vector("-encoding", "UTF-8", "-unchecked", "-deprecation", "-feature") ++ (scalaBinaryVersion.value match {
31-
case "2.12" => Vector("-Xsource:3")
31+
case "2.12" => Vector("-Xsource:3", "-release:11")
3232
case _ => Vector("-Wconf:error")
3333
})
3434
},
@@ -37,6 +37,15 @@ lazy val plugin = project
3737
scriptedLaunchOpts.value ++
3838
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
3939
},
40+
scriptedLaunchOpts ++= {
41+
if (scala.util.Properties.isJavaAtLeast("17")) {
42+
Seq("api", "file", "parser", "tree", "util").map { x =>
43+
s"--add-opens=jdk.compiler/com.sun.tools.javac.${x}=ALL-UNNAMED"
44+
}
45+
} else {
46+
Nil
47+
}
48+
},
4049
scriptedBufferLog := false,
4150
scalafmtOnCompile := true)
4251

0 commit comments

Comments
 (0)