Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Scala 3 on Scala.js #57

Merged
merged 1 commit into from
Mar 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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