summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sc14
-rw-r--r--scalaplugin/src/main/scala/mill/scalaplugin/Module.scala (renamed from scalaplugin/src/main/scala/mill/scalaplugin/Subproject.scala)8
2 files changed, 10 insertions, 12 deletions
diff --git a/build.sc b/build.sc
index e69c975d..bbcbdfbb 100755
--- a/build.sc
+++ b/build.sc
@@ -2,16 +2,12 @@
import $cp.scalaplugin.target.`scala-2.12`.`mill-scalaplugin-assembly-0.1-SNAPSHOT.jar`
import ammonite.ops.pwd
import mill._
-import mill.scalaplugin.{Subproject, Dep, TestRunner}
+import mill.scalaplugin.{Module, Dep, TestRunner}
@main def main(args: String*) = mill.Main(args, Build, interp.watch)
object Build{
- trait MillSubproject extends Subproject{
+ object Core extends Module {
def scalaVersion = "2.12.4"
- }
-
- object Core extends MillSubproject {
-
override def compileIvyDeps = Seq(
Dep.Java("org.scala-lang", "scala-reflect", scalaVersion())
)
@@ -28,7 +24,8 @@ object Build{
def basePath = pwd / 'core
override def sources = pwd/'core/'src/'main/'scala
}
- object CoreTests extends MillSubproject {
+ object CoreTests extends Module {
+ def scalaVersion = "2.12.4"
override def projectDeps = Seq(Core)
def basePath = pwd / 'scalaplugin
override def sources = pwd/'core/'src/'test/'scala
@@ -45,7 +42,8 @@ object Build{
}
}
- object ScalaPlugin extends MillSubproject {
+ object ScalaPlugin extends Module {
+ def scalaVersion = "2.12.4"
override def projectDeps = Seq(Core)
def basePath = pwd / 'scalaplugin
override def sources = pwd/'scalaplugin/'src/'main/'scala
diff --git a/scalaplugin/src/main/scala/mill/scalaplugin/Subproject.scala b/scalaplugin/src/main/scala/mill/scalaplugin/Module.scala
index 4b843cfb..1a7cbdbe 100644
--- a/scalaplugin/src/main/scala/mill/scalaplugin/Subproject.scala
+++ b/scalaplugin/src/main/scala/mill/scalaplugin/Module.scala
@@ -21,7 +21,7 @@ import xsbti.compile.DependencyChanges
-object Subproject{
+object Module{
def compileScala(scalaVersion: String,
sources: PathRef,
@@ -117,9 +117,9 @@ object Subproject{
Dep.Java("org.scala-lang", "scala-library", scalaVersion)
)
}
-import Subproject._
+import Module._
-trait Subproject extends Cacher{
+trait Module extends Cacher{
def scalaVersion: T[String]
def scalaBinaryVersion = T{ scalaVersion().split('.').dropRight(1).mkString(".") }
@@ -133,7 +133,7 @@ trait Subproject extends Cacher{
MavenRepository("https://repo1.maven.org/maven2")
)
- def projectDeps = Seq.empty[Subproject]
+ def projectDeps = Seq.empty[Module]
def depClasspath = T{ Seq.empty[PathRef] }