1- lazy val scala212 = " 2.12.20 "
2- lazy val scala213 = " 2.13.16 "
3- lazy val scala3 = " 3.7.2 "
1+ lazy val scala212 = " 2.12.21 "
2+ lazy val scala213 = " 2.13.18 "
3+ lazy val scala3 = " 3.7.4 "
44lazy val supportedScalaVersions = List (scala212, scala213, scala3)
55lazy val supportedScalaSbtVersions = List (scala212, scala3)
66
7+ javacOptions ++= Seq (" -encoding" , " UTF-8" )
78scalacOptions ++= Seq (
89 " -deprecation" ,
910 " -feature" ,
1011 " -unchecked" ,
1112 " -encoding" ,
12- " utf8 "
13+ " UTF-8 "
1314) ++
1415 (CrossVersion .partialVersion(scalaVersion.value) match {
1516 case Some ((2 , _)) => Seq (" -Xsource:3" )
@@ -46,9 +47,6 @@ addCommandAlias(
4647)
4748addCommandAlias(" quickScripted" , " quickPublish;scripted" )
4849
49- addCommandAlias(" fmtCheckAll" , " javafmtCheckAll;scalafmtCheckAll" )
50- addCommandAlias(" fmtAll" , " javafmtAll;scalafmtAll" )
51-
5250// if version was pinned already, read from file, otherwise generate new
5351version := {
5452 val versionFile = file(" version.txt" )
@@ -62,7 +60,8 @@ version := {
6260lazy val javaProjectSettings = Seq (
6361 crossScalaVersions := List (scala212),
6462 crossPaths := false ,
65- autoScalaLibrary := false
63+ autoScalaLibrary := false ,
64+ Compile / unmanagedSourceDirectories := (Compile / javaSource).value :: Nil
6665)
6766
6867LocalRootProject / name := " root"
@@ -71,16 +70,15 @@ LocalRootProject / publishLocal / skip := true
7170LocalRootProject / publishM2 / skip := true
7271
7372lazy val `sbt-live-reload` = (projectMatrix in file(" sbt" ))
74- .enablePlugins(SbtPlugin )
75- .enablePlugins(BuildInfoPlugin )
73+ .enablePlugins(SbtPlugin , BuildInfoPlugin )
7674 .settings(
7775 name := " sbt-live-reload" ,
7876 description := " Provides an universal Live Reload experience for web applications built with sbt" ,
7977 scriptedBufferLog := false ,
8078 scriptedBatchExecution := false ,
8179 (pluginCrossBuild / sbtVersion) := {
8280 scalaBinaryVersion.value match {
83- case " 2.12" => " 1.11.7 "
81+ case " 2.12" => " 1.12.0 "
8482 case _ => " 2.0.0-RC8"
8583 }
8684 },
@@ -89,8 +87,7 @@ lazy val `sbt-live-reload` = (projectMatrix in file("sbt"))
8987 scriptedLaunchOpts += version.apply { v => s " -Dproject.version= $v" }.value
9088 )
9189 .jvmPlatform(scalaVersions = supportedScalaSbtVersions)
92- .dependsOn(`build-link`)
93- .dependsOn(`runner`)
90+ .dependsOn(`build-link`, `runner`)
9491
9592lazy val `webserver` = (project in file(" core/webserver" ))
9693 .settings(javaProjectSettings)
@@ -124,7 +121,11 @@ lazy val `hook-scala` = (projectMatrix in file("core/hook-scala"))
124121 libraryDependencies := Seq (
125122 Dependencies .zio % Provided ,
126123 Dependencies .catsEffect % Provided
127- )
124+ ) ++ (scalaBinaryVersion.value match {
125+ // https://github.com/sbt/sbt/issues/8328
126+ case " 3" => Seq (" org.scala-lang" %% " scala3-library" % scalaVersion.value)
127+ case _ => Seq .empty
128+ })
128129 )
129130 .jvmPlatform(scalaVersions = supportedScalaVersions)
130131 .dependsOn(`build-link`)
0 commit comments