diff --git a/.travis.yml b/.travis.yml index c4c275c..a26b223 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,12 @@ +os: linux language: scala -sudo: required -dist: trusty +dist: bionic addons: apt: update: true jdk: - - oraclejdk8 + - openjdk8 script: - - curl https://raw.githubusercontent.com/scala-native/scala-native/master/scripts/travis_setup.sh | bash -x - ./mill __.test.run diff --git a/build.sc b/build.sc index 8dc15f1..77880b5 100644 --- a/build.sc +++ b/build.sc @@ -1,5 +1,19 @@ import mill._, scalalib._, scalajslib._, scalanativelib._, publish._ +val dottyVersions = sys.props.get("dottyVersion").toList + +val scalaVersions = "2.11.12" :: "2.12.13" :: "2.13.4" :: "3.0.0-M3" :: dottyVersions +val scala2Versions = scalaVersions.filter(_.startsWith("2.")) + +val scalaJSVersions = for { + scalaV <- scala2Versions + scalaJSV <- Seq("0.6.33", "1.4.0") +} yield (scalaV, scalaJSV) + +val scalaNativeVersions = for { + scalaV <- scala2Versions + scalaNativeV <- Seq("0.4.0") +} yield (scalaV, scalaNativeV) trait SourcecodeModule extends PublishModule { def artifactName = "sourcecode" @@ -64,8 +78,8 @@ trait SourcecodeTestModule extends ScalaModule { } object sourcecode extends Module { - val dottyVersion = Option(sys.props("dottyVersion")) - object jvm extends Cross[JvmSourcecodeModule]((List("2.11.12", "2.12.8", "2.13.0", "3.0.0-M3") ++ dottyVersion): _*) + val dottyVersion = sys.props.get("dottyVersion") + object jvm extends Cross[JvmSourcecodeModule](scalaVersions: _*) class JvmSourcecodeModule(val crossScalaVersion: String) extends SourcecodeMainModule with ScalaModule with SourcecodeModule { @@ -85,10 +99,7 @@ object sourcecode extends Module { } } - object js extends Cross[JsSourcecodeModule]( - ("2.11.12", "0.6.33"), ("2.12.10", "0.6.33"), ("2.13.1", "0.6.33"), - ("2.11.12", "1.0.0"), ("2.12.10", "1.0.0"), ("2.13.1", "1.0.0") - ) + object js extends Cross[JsSourcecodeModule](scalaJSVersions: _*) class JsSourcecodeModule(val crossScalaVersion: String, crossJSVersion: String) extends SourcecodeMainModule with ScalaJSModule with SourcecodeModule { def offset = os.up @@ -103,7 +114,7 @@ object sourcecode extends Module { } } - object native extends Cross[NativeSourcecodeModule](("2.11.12", "0.3.9"), ("2.11.12", "0.4.0-M2")) + object native extends Cross[NativeSourcecodeModule](scalaNativeVersions: _*) class NativeSourcecodeModule(val crossScalaVersion: String, crossScalaNativeVersion: String) extends SourcecodeMainModule with ScalaNativeModule with SourcecodeModule { def offset = os.up diff --git a/mill b/mill index 4afe22c..11a4b58 100755 --- a/mill +++ b/mill @@ -3,7 +3,7 @@ # This is a wrapper script, that automatically download mill from GitHub release pages # You can give the required mill version with MILL_VERSION env variable # If no version is given, it falls back to the value of DEFAULT_MILL_VERSION -DEFAULT_MILL_VERSION=0.8.0-13-105f53 +DEFAULT_MILL_VERSION=0.9.4-18-82ea87 set -e