Skip to content

Commit

Permalink
Merge pull request #33 from com-lihaoyi/scala-js-scala3
Browse files Browse the repository at this point in the history
Support Scala.js on Scala3
  • Loading branch information
lolgab committed Mar 7, 2021
2 parents 73d204a + cbde160 commit f01d6e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
15 changes: 3 additions & 12 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ val scalaVersions = "2.11.12" :: "2.12.13" :: "2.13.4" :: "3.0.0-RC1" :: dottyVe
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 @@ -38,7 +39,7 @@ trait FansiModule extends PublishModule {
}
trait FansiMainModule extends CrossScalaModule {
def millSourcePath = super.millSourcePath / offset
def ivyDeps = Agg(ivy"com.lihaoyi::sourcecode::0.2.3")
def ivyDeps = Agg(ivy"com.lihaoyi::sourcecode::0.2.4")
def offset: os.RelPath = os.rel
def sources = T.sources(
super.sources()
Expand All @@ -49,16 +50,6 @@ trait FansiMainModule extends CrossScalaModule {
)
)
)

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))
}

}


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-22-06b894
DEFAULT_MILL_VERSION=0.9.5-52-ef6d5d

set -e

Expand Down

0 comments on commit f01d6e1

Please sign in to comment.