summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.sbt12
-rwxr-xr-xbuild.sc23
-rwxr-xr-xci/test2.sh10
-rwxr-xr-xci/test3.sh2
-rw-r--r--core/src/main/scala/mill/main/Resolve.scala5
-rw-r--r--readme.md24
6 files changed, 37 insertions, 39 deletions
diff --git a/build.sbt b/build.sbt
index 8561c596..9a947800 100644
--- a/build.sbt
+++ b/build.sbt
@@ -30,9 +30,10 @@ val pluginSettings = Seq(
)
lazy val ammoniteRunner = project
- .in(file("synthetic/ammoniteRunner"))
+ .in(file("target/ammoniteRunner"))
.settings(
scalaVersion := "2.12.4",
+ target := baseDirectory.value,
libraryDependencies +=
"com.lihaoyi" % "ammonite" % "1.0.3-21-05b5d32" cross CrossVersion.full
)
@@ -55,11 +56,12 @@ def ammoniteRun(hole: SettingKey[File], args: String => List[String], suffix: St
def bridge(bridgeVersion: String) = Project(
id = "bridge" + bridgeVersion.replace('.', '_'),
- base = file("synthetic/bridge/" + bridgeVersion.replace('.', '_')),
+ base = file("target/bridge/" + bridgeVersion.replace('.', '_')),
settings = Seq(
organization := "com.lihaoyi",
scalaVersion := bridgeVersion,
name := "mill-bridge",
+ target := baseDirectory.value,
crossVersion := CrossVersion.full,
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-compiler" % scalaVersion.value,
@@ -216,16 +218,16 @@ lazy val integration = project
)
lazy val bin = project
- .in(file("synthetic/bin"))
+ .in(file("target/bin"))
.dependsOn(scalalib, scalajslib)
.settings(
sharedSettings,
- baseDirectory := baseDirectory.value.getParentFile,
+ target := baseDirectory.value,
fork := true,
connectInput in (Test, run) := true,
outputStrategy in (Test, run) := Some(StdoutOutput),
mainClass in (Test, run) := Some("mill.Main"),
- baseDirectory in (Test, run) := (baseDirectory in (Compile, run)).value / "..",
+ baseDirectory in (Test, run) := (baseDirectory in (Compile, run)).value / ".." / "..",
assemblyOption in assembly := {
(assemblyOption in assembly).value.copy(
prependShellScript = Some(
diff --git a/build.sc b/build.sc
index 74fa5b04..f48c0b65 100755
--- a/build.sc
+++ b/build.sc
@@ -117,17 +117,6 @@ object scalalib extends MillModule {
}
}
}
-object jsbridges extends Cross[JsBridgeModule]("0.6", "1.0")
-class JsBridgeModule(scalajsBinary: String) extends MillModule{
- def basePath = pwd / 'scalajslib / s"bridge_${scalajsBinary.replace('.', '_')}"
- val scalajsVersion = scalajsBinary match {
- case "0.6" => "0.6.21"
- case "1.0" => "1.0.0-M2"
- }
- def ivyDeps = Agg(
- Dep("org.scala-js", "scalajs-tools", scalajsVersion)
- )
-}
object scalajslib extends MillModule {
@@ -142,6 +131,18 @@ object scalajslib extends MillModule {
)
for((k, v) <- mapping.toSeq) yield s"-D$k=$v"
}
+
+ object jsbridges extends Cross[JsBridgeModule]("0.6", "1.0")
+ class JsBridgeModule(scalajsBinary: String) extends MillModule{
+ def basePath = super.basePath / ammonite.ops.up / s"bridge_${scalajsBinary.replace('.', '_')}"
+ val scalajsVersion = scalajsBinary match {
+ case "0.6" => "0.6.21"
+ case "1.0" => "1.0.0-M2"
+ }
+ def ivyDeps = Agg(
+ Dep("org.scala-js", "scalajs-tools", scalajsVersion)
+ )
+ }
}
def testRepos = T{
Seq(
diff --git a/ci/test2.sh b/ci/test2.sh
index 2ab4bca2..a3705bc5 100755
--- a/ci/test2.sh
+++ b/ci/test2.sh
@@ -8,8 +8,8 @@ git clean -xdf
sbt bin/test:assembly
# Run tests using
-bin/target/mill core.test
-bin/target/mill scalalib.test
-bin/target/mill scalajslib.test
-bin/target/mill integration.test
-bin/target/mill devAssembly
+target/bin/mill core.test
+target/bin/mill scalalib.test
+target/bin/mill scalajslib.test
+target/bin/mill integration.test
+target/bin/mill devAssembly
diff --git a/ci/test3.sh b/ci/test3.sh
index 91ce02b3..f7bbf9ad 100755
--- a/ci/test3.sh
+++ b/ci/test3.sh
@@ -9,7 +9,7 @@ git clean -xdf
sbt bin/test:assembly
# Build Mill using SBT
-bin/target/mill devAssembly
+target/bin/mill devAssembly
# Second build & run tests using Mill
out/devAssembly/dest core.test
diff --git a/core/src/main/scala/mill/main/Resolve.scala b/core/src/main/scala/mill/main/Resolve.scala
index b6f754d4..6796c821 100644
--- a/core/src/main/scala/mill/main/Resolve.scala
+++ b/core/src/main/scala/mill/main/Resolve.scala
@@ -13,9 +13,6 @@ object Resolve {
remainingCrossSelectors: List[List[String]],
revSelectorsSoFar: List[Segment]): Either[String, Task[Any]] = {
- pprint.log(discover.value.keySet)
- pprint.log(obj.getClass)
- pprint.log(remainingSelector)
remainingSelector match{
case Segment.Cross(_) :: Nil => Left("Selector cannot start with a [cross] segment")
case Segment.Label(last) :: Nil =>
@@ -26,8 +23,6 @@ object Resolve {
.map(Right(_))
def invokeCommand[V](target: mill.Module, name: String) = {
- pprint.log(target)
- pprint.log(discover.value.get(target.getClass))
for(cmd <- discover.value.get(target.getClass).toSeq.flatten.find(_.name == name))
yield cmd.asInstanceOf[EntryPoint[mill.Module]].invoke(target, ammonite.main.Scripts.groupArgs(rest.toList)) match {
case Router.Result.Success(v) => Right(v)
diff --git a/readme.md b/readme.md
index 7ae9ac67..67e385e6 100644
--- a/readme.md
+++ b/readme.md
@@ -25,26 +25,26 @@ core unit tests
e.g.:
```bash
-./bin/target/mill core.compile
-./bin/target/mill core.test.compile
-./bin/target/mill core.test
-./bin/target/mill scalalib.assembly
+./target/bin/mill core.compile
+./target/bin/mill core.test.compile
+./target/bin/mill core.test
+./target/bin/mill scalalib.assembly
```
There is already a `watch` option that looks for changes on files, e.g.:
```bash
-./bin/target/mill --watch core.compile
+./target/bin/mill --watch core.compile
```
You can get Mill to show the JSON-structured output for a particular `Target` or
`Command` using the `--show` flag:
```bash
-./bin/target/mill --show core.scalaVersion
-./bin/target/mill --show core.compile
-./bin/target/mill --show core.assemblyClasspath
-./bin/target/mill --show core.test
+./target/bin/mill --show core.scalaVersion
+./target/bin/mill --show core.compile
+./target/bin/mill --show core.assemblyClasspath
+./target/bin/mill --show core.test
```
Output will be generated into a the `./out` folder.
@@ -61,7 +61,7 @@ sbt "~bin/test:run"
Lastly, you can generate IntelliJ Scala project files using Mill via
```bash
-./bin/target/mill idea
+./target/bin/mill idea
```
Allowing you to import a Mill project into Intellij without using SBT
@@ -137,7 +137,7 @@ Mill provides a build REPL, which lets you explore the build interactively and
run `Target`s from Scala code:
```scala
-lihaoyi mill$ bin/target/mill
+lihaoyi mill$ target/bin/mill
Loading...
Compiling (synthetic)/ammonite/predef/interpBridge.sc
Compiling (synthetic)/ammonite/predef/replBridge.sc
@@ -290,7 +290,7 @@ git clean -xdf
sbt bin/test:assembly
# Build Mill executable using the Mill executable generated by SBT
-bin/target/mill devAssembly
+target/bin/mill devAssembly
# Build Mill executable using the Mill executable generated by Mill itself
out/devAssembly/dest devAssembly