Skip to content

Commit

Permalink
Merge pull request #57 from com-lihaoyi/scala-js-scala3
Browse files Browse the repository at this point in the history
Support Scala 3 on Scala.js
  • Loading branch information
lolgab authored Mar 7, 2021
2 parents 89252ec + 3c2aadf commit 8da5718
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
16 changes: 4 additions & 12 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ val scalaVersions = "2.12.13" :: "2.13.4" :: "3.0.0-RC1" :: dottyVersions
val scala2Versions = scalaVersions.filter(_.startsWith("2."))

val scalaJSVersions = for {
scalaV <- scala2Versions
scalaV <- scalaVersions
scalaJSV <- Seq("0.6.33", "1.4.0")
if scalaV.startsWith("2.") || scalaJSV.startsWith("1.")
} yield (scalaV, scalaJSV)

val scalaNativeVersions = for {
Expand Down Expand Up @@ -40,8 +41,8 @@ trait PPrintModule extends PublishModule {
trait PPrintMainModule extends CrossScalaModule {
def millSourcePath = super.millSourcePath / offset
def ivyDeps = Agg(
ivy"com.lihaoyi::fansi::0.2.10",
ivy"com.lihaoyi::sourcecode::0.2.3"
ivy"com.lihaoyi::fansi::0.2.11",
ivy"com.lihaoyi::sourcecode::0.2.4"
)
def compileIvyDeps =
if (crossScalaVersion.startsWith("2")) Agg(
Expand Down Expand Up @@ -122,15 +123,6 @@ object pprint extends Module {
object test extends Tests with PPrintTestModule{
val crossScalaVersion = JvmPPrintModule.this.crossScalaVersion
}

override def docJar =
if (crossScalaVersion.startsWith("2")) super.docJar
else T {
val outDir = T.ctx().dest
val javadocDir = outDir / 'javadoc
os.makeDir.all(javadocDir)
mill.api.Result.Success(mill.modules.Jvm.createJar(Agg(javadocDir))(outDir))
}
}

object js extends Cross[JsPPrintModule](scalaJSVersions:_*)
Expand Down
2 changes: 1 addition & 1 deletion mill
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.4-29-9d1d6f
DEFAULT_MILL_VERSION=0.9.5-52-ef6d5d

set -e

Expand Down

0 comments on commit 8da5718

Please sign in to comment.