summaryrefslogtreecommitdiff
path: root/build.sc
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2018-08-17 18:46:20 +0800
committerLi Haoyi <haoyi.sg@gmail.com>2018-08-17 21:55:03 +0800
commit6220c78031c8459be46d408242deb3865d4719a8 (patch)
treea1fd81cf8df5e20f8af48e6b4d37c69badc4bde0 /build.sc
parent16e67cb248ba96fc3722561bcadbba27a2779a03 (diff)
downloadmill-6220c78031c8459be46d408242deb3865d4719a8.tar.gz
mill-6220c78031c8459be46d408242deb3865d4719a8.tar.bz2
mill-6220c78031c8459be46d408242deb3865d4719a8.zip
tidy up root folder
Diffstat (limited to 'build.sc')
-rwxr-xr-xbuild.sc51
1 files changed, 25 insertions, 26 deletions
diff --git a/build.sc b/build.sc
index d9b357f7..782a4b18 100755
--- a/build.sc
+++ b/build.sc
@@ -1,5 +1,5 @@
-import $file.shared
-import $file.upload
+import $file.ci.shared
+import $file.ci.upload
import java.nio.file.attribute.PosixFilePermission
import ammonite.ops._
@@ -28,14 +28,6 @@ trait MillPublishModule extends PublishModule{
def javacOptions = Seq("-source", "1.8", "-target", "1.8")
}
-object moduledefs extends MillPublishModule with ScalaModule{
- def scalaVersion = T{ "2.12.6" }
- def ivyDeps = Agg(
- ivy"org.scala-lang:scala-compiler:${scalaVersion()}",
- ivy"com.lihaoyi::sourcecode:0.1.4"
- )
-}
-
trait MillModule extends MillPublishModule with ScalaModule{ outer =>
def scalaVersion = T{ "2.12.6" }
def compileIvyDeps = Agg(ivy"com.lihaoyi::acyclic:0.1.7")
@@ -59,18 +51,10 @@ trait MillModule extends MillPublishModule with ScalaModule{ outer =>
else Seq(outer, main.test)
def ivyDeps = Agg(ivy"com.lihaoyi::utest:0.6.4")
def testFrameworks = Seq("mill.UTestFramework")
- def scalacPluginClasspath = super.scalacPluginClasspath() ++ Seq(moduledefs.jar())
+ def scalacPluginClasspath = super.scalacPluginClasspath() ++ Seq(core.moduledefs.jar())
}
}
-
-object testng extends MillPublishModule{
- def ivyDeps = Agg(
- ivy"org.scala-sbt:test-interface:1.0",
- ivy"org.testng:testng:6.11"
- )
-}
-
object core extends MillModule {
def moduleDeps = Seq(moduledefs)
@@ -88,6 +72,15 @@ object core extends MillModule {
def generatedSources = T {
Seq(PathRef(shared.generateCoreSources(T.ctx().dest)))
}
+
+ object moduledefs extends MillPublishModule with ScalaModule{
+ def scalaVersion = T{ "2.12.6" }
+ def ivyDeps = Agg(
+ ivy"org.scala-lang:scala-compiler:${scalaVersion()}",
+ ivy"com.lihaoyi::sourcecode:0.1.4"
+ )
+ }
+
}
object main extends MillModule {
@@ -152,7 +145,7 @@ object scalalib extends MillModule {
def testArgs = T{
val genIdeaArgs =
- genTask(moduledefs)() ++
+ genTask(core.moduledefs)() ++
genTask(core)() ++
genTask(main)() ++
genTask(scalalib)() ++
@@ -226,13 +219,19 @@ object scalajslib extends MillModule {
}
}
-object twirllib extends MillModule {
- def moduleDeps = Seq(scalalib)
+object contrib extends MillModule {
+ object testng extends MillPublishModule{
+ def ivyDeps = Agg(
+ ivy"org.scala-sbt:test-interface:1.0",
+ ivy"org.testng:testng:6.11"
+ )
+ }
-}
+ object twirllib extends MillModule {
+ def moduleDeps = Seq(scalalib)
-object contrib extends MillModule {
+ }
object scalapblib extends MillModule {
def moduleDeps = Seq(scalalib)
@@ -306,14 +305,14 @@ def testRepos = T{
}
object integration extends MillModule{
- def moduleDeps = Seq(moduledefs, scalalib, scalajslib, scalanativelib)
+ def moduleDeps = Seq(core.moduledefs, scalalib, scalajslib, scalanativelib)
def testArgs = T{
scalajslib.testArgs() ++
scalalib.worker.testArgs() ++
scalalib.backgroundwrapper.testArgs() ++
scalanativelib.testArgs() ++
Seq(
- "-DMILL_TESTNG=" + testng.runClasspath().map(_.path).mkString(","),
+ "-DMILL_TESTNG=" + contrib.testng.runClasspath().map(_.path).mkString(","),
"-DMILL_VERSION=" + build.publishVersion()._2,
"-DMILL_SCALA_LIB=" + scalalib.runClasspath().map(_.path).mkString(","),
"-Djna.nosys=true"