@@ -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
1616val tagName = Def .setting {
1717 s " v ${if (releaseUseGlobalVersion.value) (ThisBuild / version).value
@@ -21,18 +21,6 @@ val tagOrHash = Def.setting {
2121 if (isSnapshot.value) gitHash() else tagName.value
2222}
2323
24- val runAll = TaskKey [Unit ](" runAll" )
25-
26- def runAllIn (config : Configuration ): Setting [Task [Unit ]] = {
27- (config / runAll) := {
28- val classes = (config / discoveredMainClasses).value
29- val runner0 = (run / runner).value
30- val cp = (config / fullClasspath).value
31- val s = streams.value
32- classes.foreach(c => runner0.run(c, Attributed .data(cp), Seq (), s.log))
33- }
34- }
35-
3624val commonSettings = Def .settings(
3725 scalapropsCoreSettings,
3826 scalapropsVersion := " 0.11.0" ,
@@ -125,15 +113,15 @@ val commonSettings = Def.settings(
125113 }
126114 },
127115 libraryDependencies ++= List (
128- " com.github.scalaprops" %%% " scalaprops" % scalapropsVersion.value % " test" ,
129- " org.scalaz" %%% " scalaz-core" % " 7.3.9"
116+ " com.github.scalaprops" %% " scalaprops" % scalapropsVersion.value % " test" ,
117+ " org.scalaz" %% " scalaz-core" % " 7.3.9"
130118 ),
131119 libraryDependencies ++= {
132120 if (isScala3.value) {
133121 Nil
134122 } else {
135123 Seq (
136- compilerPlugin(" org.typelevel" % " kind-projector" % " 0.13.4" cross CrossVersion .full)
124+ compilerPlugin(( " org.typelevel" % " kind-projector" % " 0.13.4" ). cross( CrossVersion .full) )
137125 )
138126 }
139127 }
@@ -203,24 +191,24 @@ val example = projectMatrix
203191 )
204192 .settings(
205193 commonSettings,
206- runAllIn(Compile ),
207194 noPublish
208195 )
209196 .dependsOn(
210197 optparseApplicative
211198 )
212199
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
200+ val optparseApplicativeRoot = rootProject.autoAggregate.settings(
201+ commonSettings,
202+ noPublish,
203+ TaskKey [Unit ](" testSequential" ) := Def
204+ .sequential(
205+ (optparseApplicative.projectRefs ++ example.projectRefs).map { x =>
206+ Def .sequential(
207+ Def .task(streams.value.log.info(s " start ${(x / thisProject).value.id} test " )),
208+ x / Test / testFull,
209+ Def .task(streams.value.log.info(s " end ${(x / thisProject).value.id} test " ))
210+ )
211+ }
212+ )
213+ .value
214+ )
0 commit comments