-
-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP moving most of our build logic into a Mill build.sc
- Loading branch information
Showing
57 changed files
with
117 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,15 @@ | ||
language: scala | ||
|
||
script: | ||
- sbt ++2.11.12 readme/run | ||
- sbt ++$TRAVIS_SCALA_VERSION scalatagsJVM/test scalatagsJS/test | ||
|
||
scala: | ||
- 2.11.12 | ||
- 2.12.8 | ||
- 2.13.0-M5 | ||
sudo: required | ||
dist: trusty | ||
addons: | ||
apt: | ||
update: true | ||
|
||
jdk: | ||
- oraclejdk8 | ||
- openjdk11 | ||
|
||
env: | ||
- SCALAJS_VERSION="0.6.26" | ||
- SCALAJS_VERSION="1.0.0-M6 | ||
|
||
sudo: false | ||
|
||
# cache stuff, hopefully shortening build times | ||
cache: | ||
directories: | ||
- $HOME/.ivy2 | ||
- $HOME/.sbt/boot | ||
- $HOME/.sbt/launchers | ||
- $HOME/.coursier | ||
before_cache: | ||
- find $HOME/.sbt -name "*.lock" | xargs rm | ||
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm | ||
script: | ||
- curl -L -o ~/bin/mill https://github.com/lihaoyi/mill/releases/download/0.4.0/0.4.0-12-102ddf && chmod +x ~/bin/mill | ||
- curl https://raw.githubusercontent.com/scala-native/scala-native/master/scripts/travis_setup.sh | bash -x | ||
- export PATH=~/bin/mill:$PATH | ||
- mill __.test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
import mill._, scalalib._, scalajslib._, scalanativelib._, publish._ | ||
|
||
|
||
trait ScalatagsPublishModule extends PublishModule { | ||
def artifactName = "scalatags" | ||
|
||
def publishVersion = "0.7.1" | ||
|
||
def pomSettings = PomSettings( | ||
description = artifactName(), | ||
organization = "com.lihaoyi", | ||
url = "https://github.com/lihaoyi/scalatags", | ||
licenses = Seq(License.MIT), | ||
scm = SCM( | ||
"git://github.com/lihaoyi/scalatags.git", | ||
"scm:git://github.com/lihaoyi/scalatags.git" | ||
), | ||
developers = Seq( | ||
Developer("lihaoyi", "Li Haoyi", "https://github.com/lihaoyi") | ||
) | ||
) | ||
} | ||
|
||
trait Common extends CrossScalaModule { | ||
def millSourcePath = super.millSourcePath / offset | ||
def ivyDeps = Agg( | ||
ivy"com.lihaoyi::sourcecode::0.1.7", | ||
) | ||
def compileIvyDeps = Agg( | ||
ivy"org.scala-lang:scala-reflect:${scalaVersion()}", | ||
) | ||
def offset: os.RelPath = os.rel | ||
def sources = T.sources( | ||
super.sources() | ||
.flatMap(source => | ||
Seq( | ||
PathRef(source.path / os.up / source.path.last), | ||
PathRef(source.path / os.up / os.up / source.path.last), | ||
) | ||
) | ||
) | ||
} | ||
|
||
trait CommonTestModule extends ScalaModule with TestModule { | ||
def millSourcePath = super.millSourcePath / os.up | ||
def crossScalaVersion: String | ||
def ivyDeps = Agg( | ||
ivy"com.lihaoyi::utest::0.6.9", | ||
ivy"org.scala-lang.modules::scala-xml:1.2.0", | ||
) | ||
def offset: os.RelPath = os.rel | ||
def testFrameworks = Seq("utest.runner.Framework") | ||
def sources = T.sources( | ||
super.sources() | ||
.++(CrossModuleBase.scalaVersionPaths(crossScalaVersion, s => millSourcePath / s"src-$s" )) | ||
.flatMap(source => | ||
Seq( | ||
PathRef(source.path / os.up / "test" / source.path.last), | ||
PathRef(source.path / os.up / os.up / "test" / source.path.last), | ||
) | ||
) | ||
.distinct | ||
) | ||
} | ||
|
||
|
||
object scalatags extends Module { | ||
object jvm extends Cross[JvmScalatagsModule]("2.12.8", "2.13.0") | ||
class JvmScalatagsModule(val crossScalaVersion: String) | ||
extends Common with ScalaModule with ScalatagsPublishModule { | ||
|
||
object test extends Tests with CommonTestModule{ | ||
def crossScalaVersion = JvmScalatagsModule.this.crossScalaVersion | ||
} | ||
} | ||
|
||
object js extends Cross[JSScalatagsModule](("2.12.8", "0.6.26"), ("2.13.0", "0.6.28")) | ||
class JSScalatagsModule(val crossScalaVersion: String, crossJSVersion: String) | ||
extends Common with ScalaJSModule with ScalatagsPublishModule { | ||
def scalaJSVersion = crossJSVersion | ||
def ivyDeps = super.ivyDeps() ++ Agg( | ||
ivy"org.scala-js::scalajs-dom::0.9.7" | ||
) | ||
def offset = os.up | ||
object test extends Tests with CommonTestModule{ | ||
def offset = os.up | ||
def crossScalaVersion = JSScalatagsModule.this.crossScalaVersion | ||
} | ||
} | ||
|
||
object native extends Cross[NativeScalatagsModule](("2.11.12", "0.3.8")) | ||
class NativeScalatagsModule(val crossScalaVersion: String, crossScalaNativeVersion: String) | ||
extends Common with ScalaNativeModule with ScalatagsPublishModule { | ||
def scalaNativeVersion = crossScalaNativeVersion | ||
def offset = os.up | ||
object test extends Tests with CommonTestModule{ | ||
def offset = os.up | ||
def crossScalaVersion = NativeScalatagsModule.this.crossScalaVersion | ||
} | ||
} | ||
} | ||
|
||
object example extends ScalaJSModule{ | ||
def scalaVersion = "2.12.8" | ||
def scalaJSVersion = "0.6.26" | ||
def moduleDeps = Seq(scalatags.js("2.12.8", "0.6.26")) | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1 @@ | ||
addSbtPlugin("com.lihaoyi" % "scalatex-sbt-plugin" % "0.3.11") | ||
|
||
val scalaJSVersion = | ||
Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.28") | ||
|
||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) | ||
|
||
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.2.2") | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.4") | ||
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.0") | ||
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.8") | ||
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "0.6.0") | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.