@@ -27,27 +27,6 @@ def exec(projectDir: Path, binary: String, arguments: String*): Int =
2727 exitCode
2828
2929
30- /** Versions of published projects, needs to be updated when a project in the build is updated.
31- *
32- * TODO: instead of harcoding these numbers, we could get them from the
33- * projects themselves. This likely requires injecting a custom task in the
34- * projects to output the version number to a file.
35- */
36- object Versions :
37- val cats = " 2.3.1-SNAPSHOT"
38- val catsMtl = " 1.1+DOTTY-SNAPSHOT"
39- val coop = " 1.0+DOTTY-SNAPSHOT"
40- val discipline = " 1.1.3-SNAPSHOT"
41- val disciplineMunit = " 1.0.3+DOTTY-SNAPSHOT"
42- val disciplineSpecs2 = " 1.1.3-SNAPSHOT"
43- val izumiReflect = " 1.0.0-SNAPSHOT"
44- val scalacheck = " 1.15.2-SNAPSHOT"
45- val scalatest = " 3.2.3"
46- val munit = " 0.7.19+DOTTY-SNAPSHOT"
47- val scodecBits = " 1.1+DOTTY-SNAPSHOT"
48- val simulacrumScalafix = " 0.5.1-SNAPSHOT"
49- val scalaCollectionCompat = " 2.3.0+DOTTY-SNAPSHOT"
50-
5130sealed trait CommunityProject :
5231 private var published = false
5332
@@ -115,56 +94,8 @@ final case class SbtCommunityProject(
11594 ) extends CommunityProject :
11695 override val binaryName : String = " sbt"
11796
118- // A project in the community build can depend on an arbitrary version of
119- // another project in the build, so we force the use of the version that is
120- // actually in the community build.
121- val dependencyOverrides = List (
122- // dependencyOverrides doesn't seem to understand `%%%`
123- s """ "org.scalacheck" %% "scalacheck" % " ${Versions .scalacheck}" """ ,
124- s """ "org.scalacheck" %% "scalacheck_sjs1" % " ${Versions .scalacheck}" """ ,
125- s """ "org.scalatest" %% "scalatest" % " ${Versions .scalatest}" """ ,
126- s """ "org.scalatest" %% "scalatest_sjs1" % " ${Versions .scalatest}" """ ,
127- s """ "org.scalatestplus" %% "junit-4-13" % " ${Versions .scalatest}.0" """ ,
128- s """ "org.scalameta" %% "munit" % " ${Versions .munit}" """ ,
129- s """ "org.scalameta" %% "munit_sjs1" % " ${Versions .munit}" """ ,
130- s """ "org.scalameta" %% "munit-scalacheck" % " ${Versions .munit}" """ ,
131- s """ "org.scalameta" %% "munit-scalacheck_sjs1" % " ${Versions .munit}" """ ,
132- s """ "org.scalameta" %% "junit-interface" % " ${Versions .munit}" """ ,
133- s """ "org.scodec" %% "scodec-bits" % " ${Versions .scodecBits}" """ ,
134- s """ "org.scodec" %% "scodec-bits_sjs1" % " ${Versions .scodecBits}" """ ,
135- s """ "org.typelevel" %% "discipline-core" % " ${Versions .discipline}" """ ,
136- s """ "org.typelevel" %% "discipline-core_sjs1" % " ${Versions .discipline}" """ ,
137- s """ "org.typelevel" %% "discipline-munit" % " ${Versions .disciplineMunit}" """ ,
138- s """ "org.typelevel" %% "discipline-munit_sjs1" % " ${Versions .disciplineMunit}" """ ,
139- s """ "org.typelevel" %% "discipline-specs2" % " ${Versions .disciplineSpecs2}" """ ,
140- s """ "org.typelevel" %% "discipline-specs2_sjs1" % " ${Versions .disciplineSpecs2}" """ ,
141- s """ "org.typelevel" %% "simulacrum-scalafix-annotations" % " ${Versions .simulacrumScalafix}" """ ,
142- s """ "org.typelevel" %% "simulacrum-scalafix-annotations_sjs1" % " ${Versions .simulacrumScalafix}" """ ,
143- s """ "org.typelevel" %% "cats-core" % " ${Versions .cats}" """ ,
144- s """ "org.typelevel" %% "cats-core_sjs1" % " ${Versions .cats}" """ ,
145- s """ "org.typelevel" %% "cats-free" % " ${Versions .cats}" """ ,
146- s """ "org.typelevel" %% "cats-free_sjs1" % " ${Versions .cats}" """ ,
147- s """ "org.typelevel" %% "cats-kernel" % " ${Versions .cats}" """ ,
148- s """ "org.typelevel" %% "cats-kernel_sjs1" % " ${Versions .cats}" """ ,
149- s """ "org.typelevel" %% "cats-kernel-laws" % " ${Versions .cats}" """ ,
150- s """ "org.typelevel" %% "cats-kernel-laws_sjs1" % " ${Versions .cats}" """ ,
151- s """ "org.typelevel" %% "cats-laws" % " ${Versions .cats}" """ ,
152- s """ "org.typelevel" %% "cats-laws_sjs1" % " ${Versions .cats}" """ ,
153- s """ "org.typelevel" %% "cats-testkit" % " ${Versions .cats}" """ ,
154- s """ "org.typelevel" %% "cats-testkit_sjs1" % " ${Versions .cats}" """ ,
155- s """ "org.typelevel" %% "cats-mtl" % " ${Versions .catsMtl}" """ ,
156- s """ "org.typelevel" %% "cats-mtl_sjs1" % " ${Versions .catsMtl}" """ ,
157- s """ "org.typelevel" %% "cats-mtl-laws" % " ${Versions .catsMtl}" """ ,
158- s """ "org.typelevel" %% "cats-mtl-laws_sjs1" % " ${Versions .catsMtl}" """ ,
159- s """ "org.typelevel" %% "coop" % " ${Versions .coop}" """ ,
160- s """ "org.typelevel" %% "coop_sjs1" % " ${Versions .coop}" """ ,
161- s """ "dev.zio" %% "izumi-reflect" % " ${Versions .izumiReflect}" """ ,
162- s """ "org.scala-lang.modules" %% "scala-collection-compat" % " ${Versions .scalaCollectionCompat}" """ ,
163- )
164-
16597 private val baseCommand =
16698 " clean; set logLevel in Global := Level.Error; set updateOptions in Global ~= (_.withLatestSnapshots(false)); "
167- ++ s """ set dependencyOverrides in ThisBuild ++= ${dependencyOverrides.mkString(" Seq(" , " , " , " )" )}; """
16899 ++ s " ++ $compilerVersion!; "
169100
170101 override val testCommand =
@@ -186,7 +117,8 @@ final case class SbtCommunityProject(
186117 case _ => Nil
187118 extraSbtArgs ++ sbtProps ++ List (
188119 " -sbt-version" , " 1.4.7" ,
189- " -Dsbt.supershell=false" ,
120+ " -Dsbt.supershell=false" ,
121+ s " -Ddotty.communitybuild.dir= $communitybuildDir" ,
190122 s " --addPluginSbtFile= $sbtPluginFilePath"
191123 )
192124
@@ -423,17 +355,15 @@ object projects:
423355 lazy val munit = SbtCommunityProject (
424356 project = " munit" ,
425357 sbtTestCommand = " testsJVM/test;testsJS/test;" ,
426- // Hardcode the version to avoid having to deal with something set by sbt-dynver
427- sbtPublishCommand = s """ set every version := " ${Versions .munit}"; munitJVM/publishLocal; munitJS/publishLocal; munitScalacheckJVM/publishLocal; munitScalacheckJS/publishLocal; junit/publishLocal """ ,
358+ sbtPublishCommand = " munitJVM/publishLocal; munitJS/publishLocal; munitScalacheckJVM/publishLocal; munitScalacheckJS/publishLocal; junit/publishLocal" ,
428359 sbtDocCommand = " junit/doc; munitJVM/doc" ,
429360 dependencies = List (scalacheck)
430361 )
431362
432363 lazy val scodecBits = SbtCommunityProject (
433364 project = " scodec-bits" ,
434365 sbtTestCommand = " coreJVM/test;coreJS/test" ,
435- // Hardcode the version to avoid having to deal with something set by sbt-git
436- sbtPublishCommand = s """ set every version := " ${Versions .scodecBits}"; coreJVM/publishLocal;coreJS/publishLocal """ ,
366+ sbtPublishCommand = " coreJVM/publishLocal;coreJS/publishLocal" ,
437367 sbtDocCommand = " coreJVM/doc" ,
438368 dependencies = List (munit)
439369 )
@@ -509,7 +439,7 @@ object projects:
509439 lazy val scalaCollectionCompat = SbtCommunityProject (
510440 project = " scala-collection-compat" ,
511441 sbtTestCommand = " compat30/test" ,
512- sbtPublishCommand = s """ set every version := " ${ Versions .scalaCollectionCompat} "; compat30/publishLocal"" " ,
442+ sbtPublishCommand = " compat30/publishLocal" ,
513443 )
514444
515445 lazy val verify = SbtCommunityProject (
@@ -528,7 +458,7 @@ object projects:
528458 lazy val disciplineMunit = SbtCommunityProject (
529459 project = " discipline-munit" ,
530460 sbtTestCommand = " test" ,
531- sbtPublishCommand = s """ set every version := " ${ Versions .disciplineMunit} "; coreJVM/publishLocal;coreJS/publishLocal"" " ,
461+ sbtPublishCommand = " coreJVM/publishLocal;coreJS/publishLocal" ,
532462 dependencies = List (discipline, munit)
533463 )
534464
@@ -555,14 +485,14 @@ object projects:
555485 lazy val catsMtl = SbtCommunityProject (
556486 project = " cats-mtl" ,
557487 sbtTestCommand = " testsJVM/test;testsJS/test" ,
558- sbtPublishCommand = s """ set every version := " ${ Versions .catsMtl} "; coreJVM/publishLocal;coreJS/publishLocal;lawsJVM/publishLocal;lawsJS/publishLocal"" " ,
488+ sbtPublishCommand = " coreJVM/publishLocal;coreJS/publishLocal;lawsJVM/publishLocal;lawsJS/publishLocal" ,
559489 dependencies = List (cats, disciplineMunit)
560490 )
561491
562492 lazy val coop = SbtCommunityProject (
563493 project = " coop" ,
564494 sbtTestCommand = " test" ,
565- sbtPublishCommand = s """ set every version := " ${ Versions .coop} "; coreJVM/publishLocal;coreJS/publishLocal"" " ,
495+ sbtPublishCommand = " coreJVM/publishLocal;coreJS/publishLocal" ,
566496 dependencies = List (cats, catsMtl)
567497 )
568498
0 commit comments