Skip to content

Commit ce1ff82

Browse files
build: use sbt 2
1 parent f9927c8 commit ce1ff82

6 files changed

Lines changed: 15 additions & 24 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
java-version: ${{ matrix.java-version }}
2525
- name: Run tests
26-
run: sbt 'compile; ++ 3 test'
26+
run: sbt 'compile; ...@scalaBinaryVersion=3/test'
2727
sbt-integration:
2828
strategy:
2929
matrix:

build.sbt

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
import Dependencies.*
22
import MillScripted.*
33
import Settings.*
4-
import sbt.internal.ProjectMatrix
4+
import sbt.ProjectMatrix
55

6-
lazy val root = (project withId "stryker4s" in file("."))
6+
lazy val root = rootProject
77
.settings(
88
buildLevelSettings,
99
publish / skip := true,
1010
// Publish locally for sbt plugin testing
1111
addCommandAlias(
1212
"publishPluginLocal",
13-
"set ThisBuild / version := \"0.0.0-TEST-SNAPSHOT\"; sbtPlugin/publishLocal"
13+
"set ThisBuild / version := \"0.0.0-TEST-SNAPSHOT\"; sbtPlugin/publishLocal; sbtPlugin3/publishLocal"
1414
),
1515
// Publish to .m2 folder for Maven plugin testing
1616
addCommandAlias(
1717
"publishM2Local",
18-
"set ThisBuild / version := \"SET-BY-SBT-SNAPSHOT\"; core3/publishM2; testkit3/publishM2"
18+
"set ThisBuild / version := \"SET-BY-SBT-SNAPSHOT\"; core/publishM2; testkit/publishM2"
1919
),
2020
// Publish to .ivy folder for command runner local testing
2121
addCommandAlias(
@@ -28,18 +28,7 @@ lazy val root = (project withId "stryker4s" in file("."))
2828
"set ThisBuild / version := \"0.0.0-TEST-SNAPSHOT\"; millPlugin/publishLocal"
2929
)
3030
)
31-
.aggregate(
32-
(
33-
api.projectRefs ++
34-
commandRunner.projectRefs ++
35-
core.projectRefs ++
36-
millPlugin.projectRefs ++
37-
sbtPlugin.projectRefs ++
38-
testRunner.projectRefs ++
39-
testkit.projectRefs ++
40-
testRunnerApi.projectRefs
41-
) *
42-
)
31+
.autoAggregate
4332

4433
lazy val core = (projectMatrix in file("modules") / "core")
4534
.settings(commonSettings, coreSettings, publishLocalDependsOn(api, testRunnerApi, testRunner))

project/MillScripted.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ object MillScripted {
4848
val command = Seq(s".${separator}mill", "--no-daemon") ++ args
4949
val os = sys.props("os.name").toLowerCase
5050
val panderToWindows = os match {
51-
case n if n contains "windows" => Seq("cmd", "/C") ++ command
52-
case _ => command
51+
case n if n.contains("windows") => Seq("cmd", "/C") ++ command
52+
case _ => command
5353
}
5454
log.info(s"Running: ${panderToWindows.mkString(" ")}")
5555
val exit = Process(panderToWindows, mutate).!(logger)

project/Settings.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ object Settings {
2828
ScalacOptions.source("3", version => version.isBetween(ScalaVersion.V2_12_0, ScalaVersion.V2_13_0)),
2929
ScalacOptions.source("3-cross", version => version.isBetween(ScalaVersion.V2_13_0, ScalaVersion.V3_0_0)),
3030
ScalacOptions.release("17")
31-
)
31+
),
32+
exportJars := false
3233
)
3334

3435
lazy val coreSettings: Seq[Setting[?]] = Seq(

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.12.13
1+
sbt.version=2.0.0

project/plugins.sbt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.2")
22
addSbtPlugin("io.stryker-mutator" % "sbt-stryker4s" % "0.21.0")
33
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.6")
4-
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.11.0")
54

65
// Protobuf plugin and its dependencies
7-
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.8")
8-
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.20"
6+
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.1.0-RC1")
7+
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "1.0.0-alpha.5"
8+
resolvers += Resolver.sonatypeCentralSnapshots
9+
libraryDependencies += "com.thesamet.scalapb" %% "protoc-bridge" % "0.9.9+31-85db2060-SNAPSHOT"

0 commit comments

Comments
 (0)