@@ -2,25 +2,16 @@ import mill._, scalalib._, scalajslib._, scalanativelib._, publish._
22import mill .scalalib .api .Util .isScala3
33import $ivy .`de.tototec::de.tobiasroeser.mill.vcs.version::0.1.4`
44import de .tobiasroeser .mill .vcs .version .VcsVersion
5- import $ivy .`com.github.lolgab::mill-mima::0.0.9 `
5+ import $ivy .`com.github.lolgab::mill-mima::0.0.11 `
66import com .github .lolgab .mill .mima ._
77
8- val dottyVersions = sys.props.get(" dottyVersion" ).toList
8+ val dottyCommunityBuildVersion = sys.props.get(" dottyVersion" ).toList
99
10- val scala2VersionsAndDotty = " 2.12.13" :: " 2.13.4" :: " 2.11.12" :: dottyVersions
11- val scala30 = " 3.0.2"
12- val scala31 = " 3.1.1"
10+ val scalaVersions =
11+ " 2.12.16" :: " 2.13.8" :: " 2.11.12" :: " 3.1.3" :: dottyCommunityBuildVersion
1312
14- val scalaJSVersions = for {
15- scalaV <- scala30 :: scala2VersionsAndDotty
16- scalaJSV <- Seq (" 0.6.33" , " 1.5.1" )
17- if scalaV.startsWith(" 2." ) || scalaJSV.startsWith(" 1." )
18- } yield (scalaV, scalaJSV)
19-
20- val scalaNativeVersions = for {
21- scalaV <- scala31 :: scala2VersionsAndDotty
22- scalaNativeV <- Seq (" 0.4.4" )
23- } yield (scalaV, scalaNativeV)
13+ val scalaJSVersions = scalaVersions.map((_, " 1.10.1" ))
14+ val scalaNativeVersions = scalaVersions.map((_, " 0.4.5" ))
2415
2516trait PPrintModule extends PublishModule with Mima {
2617 def artifactName = " pprint"
@@ -29,10 +20,17 @@ trait PPrintModule extends PublishModule with Mima {
2920
3021 def mimaPreviousVersions = VcsVersion .vcsState().lastTag.toSeq
3122
23+ def crossScalaVersion : String
24+
25+ // Temporary until the next version of Mima gets released with
26+ // https://github.com/lightbend/mima/issues/693 included in the release.
27+ def mimaPreviousArtifacts =
28+ if (isScala3(crossScalaVersion)) Agg .empty[Dep ] else super .mimaPreviousArtifacts()
29+
3230 def pomSettings = PomSettings (
3331 description = artifactName(),
3432 organization = " com.lihaoyi" ,
35- url = " https://github.com/lihaoyi/PPrint" ,
33+ url = " https://github.com/com- lihaoyi/PPrint" ,
3634 licenses = Seq (License .MIT ),
3735 versionControl = VersionControl .github(
3836 owner = " com-lihaoyi" ,
@@ -46,8 +44,8 @@ trait PPrintModule extends PublishModule with Mima {
4644trait PPrintMainModule extends CrossScalaModule {
4745 def millSourcePath = super .millSourcePath / offset
4846 def ivyDeps = Agg (
49- ivy " com.lihaoyi::fansi::0.3.1 " ,
50- ivy " com.lihaoyi::sourcecode::0.2.8 "
47+ ivy " com.lihaoyi::fansi::0.4.0 " ,
48+ ivy " com.lihaoyi::sourcecode::0.3.0 "
5149 )
5250 def compileIvyDeps =
5351 if (crossScalaVersion.startsWith(" 2" )) Agg (
@@ -70,7 +68,7 @@ trait PPrintMainModule extends CrossScalaModule {
7068
7169trait PPrintTestModule extends ScalaModule with TestModule .Utest {
7270 def crossScalaVersion : String
73- def ivyDeps = Agg (ivy " com.lihaoyi::utest::0.7.11 " )
71+ def ivyDeps = Agg (ivy " com.lihaoyi::utest::0.8.0 " )
7472 def offset : os.RelPath = os.rel
7573 def millSourcePath = super .millSourcePath / os.up
7674
@@ -88,7 +86,7 @@ trait PPrintTestModule extends ScalaModule with TestModule.Utest {
8886}
8987
9088object pprint extends Module {
91- object jvm extends Cross [JvmPPrintModule ](scala30 :: scala2VersionsAndDotty :_* )
89+ object jvm extends Cross [JvmPPrintModule ](scalaVersions :_* )
9290 class JvmPPrintModule (val crossScalaVersion : String )
9391 extends PPrintMainModule with ScalaModule with PPrintModule {
9492 object test extends Tests with PPrintTestModule {
@@ -99,6 +97,7 @@ object pprint extends Module {
9997 object js extends Cross [JsPPrintModule ](scalaJSVersions:_* )
10098 class JsPPrintModule (val crossScalaVersion : String , crossJSVersion : String )
10199 extends PPrintMainModule with ScalaJSModule with PPrintModule {
100+
102101 def offset = os.up
103102 def scalaJSVersion = crossJSVersion
104103 object test extends Tests with PPrintTestModule {
@@ -112,8 +111,6 @@ object pprint extends Module {
112111 extends PPrintMainModule with ScalaNativeModule with PPrintModule {
113112 def offset = os.up
114113 def scalaNativeVersion = crossScalaNativeVersion
115- // Remove after Scala Native Scala 3 artifacts are published
116- def mimaPreviousArtifacts = T { if (isScala3(scalaVersion())) Seq () else super .mimaPreviousArtifacts() }
117114 object test extends Tests with PPrintTestModule {
118115 def offset = os.up
119116 val crossScalaVersion = NativePPrintModule .this .crossScalaVersion
0 commit comments