Skip to content

Commit 52e158a

Browse files
committed
sbt 2
1 parent e2e5d0f commit 52e158a

4 files changed

Lines changed: 24 additions & 23 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
java:
15-
- 11
15+
- 17
1616
- 25
1717
steps:
1818
- uses: actions/checkout@v7

build.sbt

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ val isScala3 = Def.setting(
1111
CrossVersion.partialVersion(scalaVersion.value).exists(_._1 == 3)
1212
)
1313

14-
def gitHash(): String = sys.process.Process("git rev-parse HEAD").lineStream_!.head
14+
def gitHash(): String = sys.process.Process("git rev-parse HEAD").lazyLines_!.head
1515

1616
val tagName = Def.setting {
1717
s"v${if (releaseUseGlobalVersion.value) (ThisBuild / version).value
@@ -21,13 +21,14 @@ val tagOrHash = Def.setting {
2121
if (isSnapshot.value) gitHash() else tagName.value
2222
}
2323

24-
val runAll = TaskKey[Unit]("runAll")
24+
@transient
25+
val runAll = taskKey[Unit]("")
2526

2627
def runAllIn(config: Configuration): Setting[Task[Unit]] = {
2728
(config / runAll) := {
2829
val classes = (config / discoveredMainClasses).value
2930
val runner0 = (run / runner).value
30-
val cp = (config / fullClasspath).value
31+
val cp = (config / fullClasspath).value.map(x => Attributed.blank(fileConverter.value.toPath(x.data)))
3132
val s = streams.value
3233
classes.foreach(c => runner0.run(c, Attributed.data(cp), Seq(), s.log))
3334
}
@@ -125,15 +126,15 @@ val commonSettings = Def.settings(
125126
}
126127
},
127128
libraryDependencies ++= List(
128-
"com.github.scalaprops" %%% "scalaprops" % scalapropsVersion.value % "test",
129-
"org.scalaz" %%% "scalaz-core" % "7.3.9"
129+
"com.github.scalaprops" %% "scalaprops" % scalapropsVersion.value % "test",
130+
"org.scalaz" %% "scalaz-core" % "7.3.9"
130131
),
131132
libraryDependencies ++= {
132133
if (isScala3.value) {
133134
Nil
134135
} else {
135136
Seq(
136-
compilerPlugin("org.typelevel" % "kind-projector" % "0.13.4" cross CrossVersion.full)
137+
compilerPlugin(("org.typelevel" % "kind-projector" % "0.13.4").cross(CrossVersion.full))
137138
)
138139
}
139140
}
@@ -210,17 +211,18 @@ val example = projectMatrix
210211
optparseApplicative
211212
)
212213

213-
commonSettings
214-
noPublish
215-
216-
TaskKey[Unit]("testSequential") := Def
217-
.sequential(
218-
(optparseApplicative.projectRefs ++ example.projectRefs).map { x =>
219-
Def.sequential(
220-
Def.task(streams.value.log.info(s"start ${(x / thisProject).value.id} test")),
221-
x / Test / test,
222-
Def.task(streams.value.log.info(s"end ${(x / thisProject).value.id} test"))
223-
)
224-
}
225-
)
226-
.value
214+
val optparseApplicativeRoot = rootProject.autoAggregate.settings(
215+
commonSettings,
216+
noPublish,
217+
TaskKey[Unit]("testSequential") := Def
218+
.sequential(
219+
(optparseApplicative.projectRefs ++ example.projectRefs).map { x =>
220+
Def.sequential(
221+
Def.task(streams.value.log.info(s"start ${(x / thisProject).value.id} test")),
222+
x / Test / testFull,
223+
Def.task(streams.value.log.info(s"end ${(x / thisProject).value.id} test"))
224+
)
225+
}
226+
)
227+
.value
228+
)

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: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.6.1")
22
addSbtPlugin("com.github.scalaprops" % "sbt-scalaprops" % "0.5.3")
3-
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.11.0")
43
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.22.0")
54
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.12")
65
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1")

0 commit comments

Comments
 (0)