1
1
import mill ._ , scalalib ._ , scalajslib ._ , scalanativelib ._ , publish ._
2
2
3
+ val dottyVersions = sys.props.get(" dottyVersion" ).toList
4
+
5
+ val scalaVersions = " 2.11.12" :: " 2.12.13" :: " 2.13.4" :: " 3.0.0-M3" :: dottyVersions
6
+ val scala2Versions = scalaVersions.filter(_.startsWith(" 2." ))
7
+
8
+ val scalaJSVersions = for {
9
+ scalaV <- scala2Versions
10
+ scalaJSV <- Seq (" 0.6.33" , " 1.4.0" )
11
+ } yield (scalaV, scalaJSV)
12
+
13
+ val scalaNativeVersions = for {
14
+ scalaV <- scala2Versions
15
+ scalaNativeV <- Seq (" 0.4.0" )
16
+ } yield (scalaV, scalaNativeV)
3
17
4
18
trait SourcecodeModule extends PublishModule {
5
19
def artifactName = " sourcecode"
@@ -64,8 +78,8 @@ trait SourcecodeTestModule extends ScalaModule {
64
78
}
65
79
66
80
object sourcecode extends Module {
67
- val dottyVersion = Option ( sys.props(" dottyVersion" ) )
68
- object jvm extends Cross [JvmSourcecodeModule ](( List ( " 2.11.12 " , " 2.12.8 " , " 2.13.0 " , " 3.0.0-M3 " ) ++ dottyVersion) : _* )
81
+ val dottyVersion = sys.props.get (" dottyVersion" )
82
+ object jvm extends Cross [JvmSourcecodeModule ](scalaVersions : _* )
69
83
class JvmSourcecodeModule (val crossScalaVersion : String )
70
84
extends SourcecodeMainModule with ScalaModule with SourcecodeModule {
71
85
@@ -85,10 +99,7 @@ object sourcecode extends Module {
85
99
}
86
100
}
87
101
88
- object js extends Cross [JsSourcecodeModule ](
89
- (" 2.11.12" , " 0.6.33" ), (" 2.12.10" , " 0.6.33" ), (" 2.13.1" , " 0.6.33" ),
90
- (" 2.11.12" , " 1.0.0" ), (" 2.12.10" , " 1.0.0" ), (" 2.13.1" , " 1.0.0" )
91
- )
102
+ object js extends Cross [JsSourcecodeModule ](scalaJSVersions : _* )
92
103
class JsSourcecodeModule (val crossScalaVersion : String , crossJSVersion : String )
93
104
extends SourcecodeMainModule with ScalaJSModule with SourcecodeModule {
94
105
def offset = os.up
@@ -103,7 +114,7 @@ object sourcecode extends Module {
103
114
}
104
115
}
105
116
106
- object native extends Cross [NativeSourcecodeModule ](( " 2.11.12 " , " 0.3.9 " ), ( " 2.11.12 " , " 0.4.0-M2 " ) )
117
+ object native extends Cross [NativeSourcecodeModule ](scalaNativeVersions : _* )
107
118
class NativeSourcecodeModule (val crossScalaVersion : String , crossScalaNativeVersion : String )
108
119
extends SourcecodeMainModule with ScalaNativeModule with SourcecodeModule {
109
120
def offset = os.up
0 commit comments