@@ -2,25 +2,16 @@ import mill._, scalalib._, scalajslib._, scalanativelib._, publish._
2
2
import mill .scalalib .api .Util .isScala3
3
3
import $ivy .`de.tototec::de.tobiasroeser.mill.vcs.version::0.1.4`
4
4
import 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 `
6
6
import com .github .lolgab .mill .mima ._
7
7
8
- val dottyVersions = sys.props.get(" dottyVersion" ).toList
8
+ val dottyCommunityBuildVersion = sys.props.get(" dottyVersion" ).toList
9
9
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
13
12
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" ))
24
15
25
16
trait PPrintModule extends PublishModule with Mima {
26
17
def artifactName = " pprint"
@@ -29,10 +20,17 @@ trait PPrintModule extends PublishModule with Mima {
29
20
30
21
def mimaPreviousVersions = VcsVersion .vcsState().lastTag.toSeq
31
22
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
+
32
30
def pomSettings = PomSettings (
33
31
description = artifactName(),
34
32
organization = " com.lihaoyi" ,
35
- url = " https://github.com/lihaoyi/PPrint" ,
33
+ url = " https://github.com/com- lihaoyi/PPrint" ,
36
34
licenses = Seq (License .MIT ),
37
35
versionControl = VersionControl .github(
38
36
owner = " com-lihaoyi" ,
@@ -46,8 +44,8 @@ trait PPrintModule extends PublishModule with Mima {
46
44
trait PPrintMainModule extends CrossScalaModule {
47
45
def millSourcePath = super .millSourcePath / offset
48
46
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 "
51
49
)
52
50
def compileIvyDeps =
53
51
if (crossScalaVersion.startsWith(" 2" )) Agg (
@@ -70,7 +68,7 @@ trait PPrintMainModule extends CrossScalaModule {
70
68
71
69
trait PPrintTestModule extends ScalaModule with TestModule .Utest {
72
70
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 " )
74
72
def offset : os.RelPath = os.rel
75
73
def millSourcePath = super .millSourcePath / os.up
76
74
@@ -88,7 +86,7 @@ trait PPrintTestModule extends ScalaModule with TestModule.Utest {
88
86
}
89
87
90
88
object pprint extends Module {
91
- object jvm extends Cross [JvmPPrintModule ](scala30 :: scala2VersionsAndDotty :_* )
89
+ object jvm extends Cross [JvmPPrintModule ](scalaVersions :_* )
92
90
class JvmPPrintModule (val crossScalaVersion : String )
93
91
extends PPrintMainModule with ScalaModule with PPrintModule {
94
92
object test extends Tests with PPrintTestModule {
@@ -99,6 +97,7 @@ object pprint extends Module {
99
97
object js extends Cross [JsPPrintModule ](scalaJSVersions:_* )
100
98
class JsPPrintModule (val crossScalaVersion : String , crossJSVersion : String )
101
99
extends PPrintMainModule with ScalaJSModule with PPrintModule {
100
+
102
101
def offset = os.up
103
102
def scalaJSVersion = crossJSVersion
104
103
object test extends Tests with PPrintTestModule {
@@ -112,8 +111,6 @@ object pprint extends Module {
112
111
extends PPrintMainModule with ScalaNativeModule with PPrintModule {
113
112
def offset = os.up
114
113
def scalaNativeVersion = crossScalaNativeVersion
115
- // Remove after Scala Native Scala 3 artifacts are published
116
- def mimaPreviousArtifacts = T { if (isScala3(scalaVersion())) Seq () else super .mimaPreviousArtifacts() }
117
114
object test extends Tests with PPrintTestModule {
118
115
def offset = os.up
119
116
val crossScalaVersion = NativePPrintModule .this .crossScalaVersion
0 commit comments