Skip to content

Commit 6ceebe8

Browse files
build: use sbt 2
1 parent 50d31e7 commit 6ceebe8

5 files changed

Lines changed: 14 additions & 24 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
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; ++2.13 test'
26+
run: sbt 'testRunnerApi2_13/protocExecutable; compile; ++3 test'
2727
sbt-scripted:
2828
strategy:
2929
matrix:
@@ -35,15 +35,15 @@ jobs:
3535
- uses: ./.github/setup
3636
- name: Run tests
3737
# sbtTestRunner3 is required by test-subproject (Scala 3 LTS); 2_12 by test-1.
38-
run: sbt 'sbtTestRunner2_12/publishLocal; sbtTestRunner3/publishLocal; sbtPlugin/scripted'
38+
run: sbt 'testRunnerApi2_13/protocExecutable; sbtTestRunner2_12/publishLocal; sbtTestRunner/publishLocal; sbtPlugin2_12/scripted'
3939
sbt-scripted-2:
4040
name: sbt 2 plugin scripted tests
4141
runs-on: ubuntu-latest
4242
steps:
4343
- uses: actions/checkout@v6
4444
- uses: ./.github/setup
4545
- name: Run tests
46-
run: sbt 'sbtTestRunner2_12/publishLocal; sbtTestRunner3/publishLocal; sbtPlugin3/scripted'
46+
run: sbt 'testRunnerApi2_13/protocExecutable; sbtTestRunner2_12/publishLocal; sbtTestRunner/publishLocal; sbtPlugin/scripted'
4747
maven-plugin:
4848
name: Test Maven plugin
4949
runs-on: ubuntu-latest
@@ -56,7 +56,7 @@ jobs:
5656
- name: Cleanup M2
5757
run: rm -rf ~/.m2/repository/io/stryker-mutator/*/SET-BY-SBT-SNAPSHOT/
5858
- name: Publish core
59-
run: sbt 'publishM2Local'
59+
run: sbt 'testRunnerApi2_13/protocExecutable; publishM2Local'
6060
- name: Run Maven tests
6161
run: |
6262
cd maven
@@ -88,7 +88,7 @@ jobs:
8888
with:
8989
java-version: 17
9090
- name: Publish
91-
run: sbt ci-release
91+
run: sbt 'testRunnerApi2_13/protocExecutable; ci-release'
9292
env:
9393
CI_RELEASE: stryker4sPublishSigned
9494
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}

build.sbt

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,28 @@
11
import Dependencies.*
22
import Settings.*
3-
import sbt.internal.ProjectMatrix
3+
import sbt.ProjectMatrix
44

5-
lazy val root = (project withId "stryker4s" in file("."))
5+
lazy val root = rootProject
66
.settings(
77
buildLevelSettings,
88
publish / skip := true,
99
// Publish locally for sbt plugin testing
1010
addCommandAlias(
1111
"publishPluginLocal",
12-
"set ThisBuild / version := \"0.0.0-TEST-SNAPSHOT\"; sbtPlugin/publishLocal; sbtTestRunner/publishLocal; sbtTestRunner3/publishLocal"
12+
"set ThisBuild / version := \"0.0.0-TEST-SNAPSHOT\"; sbtPlugin2_12/publishLocal; sbtPlugin/publishLocal; sbtTestRunner2_13/publishLocal; sbtTestRunner/publishLocal"
1313
),
1414
// Publish to .m2 folder for Maven plugin testing
1515
addCommandAlias(
1616
"publishM2Local",
17-
"set ThisBuild / version := \"SET-BY-SBT-SNAPSHOT\"; core/publishM2;"
17+
"set ThisBuild / version := \"SET-BY-SBT-SNAPSHOT\"; core2_13/publishM2;"
1818
),
1919
// Publish to .ivy folder for command runner local testing
2020
addCommandAlias(
2121
"publishCommandRunnerLocal",
2222
"set ThisBuild / version := \"0.0.0-TEST-SNAPSHOT\"; commandRunner/publishLocal"
2323
)
2424
)
25-
.aggregate(
26-
(core.projectRefs ++
27-
commandRunner.projectRefs ++
28-
sbtPlugin.projectRefs ++
29-
sbtTestRunner.projectRefs ++
30-
testRunnerApi.projectRefs ++
31-
api.projectRefs ++
32-
testkit.projectRefs) *
33-
)
25+
.autoAggregate
3426

3527
lazy val core = (projectMatrix in file("modules") / "core")
3628
.settings(commonSettings, coreSettings, publishLocalDependsOn(api, testRunnerApi, testkit))
@@ -45,7 +37,6 @@ lazy val commandRunner = (projectMatrix in file("modules") / "commandRunner")
4537
// sbt plugins have to use Scala 2.12
4638
lazy val sbtPlugin = (projectMatrix in file("modules") / "sbt")
4739
.enablePlugins(SbtPlugin)
48-
.defaultAxes(VirtualAxis.scalaPartialVersion("2.12"), VirtualAxis.jvm)
4940
.settings(commonSettings, sbtPluginSettings, publishLocalDependsOn(core))
5041
.dependsOn(core)
5142
.jvmPlatform(scalaVersions = Seq(versions.scala212, versions.scala3Lts))

project/Release.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ object Release {
99
private val stryker4sReleaseAll = "stryker4sReleaseAll"
1010
// Helper command names
1111
private val stryker4sMvnDeploy = "stryker4sMvnDeploy"
12-
private val publishM2Core = "core/publishM2"
12+
private val publishM2Core = "core2_13/publishM2"
1313
private val crossPublishSigned = "publishSigned"
1414

1515
lazy val releaseCommands: Setting[Seq[Command]] = commands ++= 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.12
1+
sbt.version=2.0.0

project/plugins.sbt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
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"

0 commit comments

Comments
 (0)