summaryrefslogtreecommitdiff
path: root/core/src/test/examples/javac/build.sc
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2017-11-09 22:36:47 -0800
committerLi Haoyi <haoyi.sg@gmail.com>2017-11-09 22:36:47 -0800
commit550772d7515757339269c28c41fd0d8109e0fa2c (patch)
tree13ed3c93b85788dadbcd938930ed05ebc460f646 /core/src/test/examples/javac/build.sc
parentc7ab7da7ccd21c63740f6494811a09722a0d2ce0 (diff)
downloadmill-550772d7515757339269c28c41fd0d8109e0fa2c.tar.gz
mill-550772d7515757339269c28c41fd0d8109e0fa2c.tar.bz2
mill-550772d7515757339269c28c41fd0d8109e0fa2c.zip
Migrate over to the new `Task`/`Target`/`Command` split
Diffstat (limited to 'core/src/test/examples/javac/build.sc')
-rw-r--r--core/src/test/examples/javac/build.sc14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/src/test/examples/javac/build.sc b/core/src/test/examples/javac/build.sc
index d7ba5662..37d7a5a6 100644
--- a/core/src/test/examples/javac/build.sc
+++ b/core/src/test/examples/javac/build.sc
@@ -1,4 +1,4 @@
-import forge.define.Target
+import forge.define.Task
import forge.eval.PathRef
object Foo {
@@ -21,14 +21,14 @@ object Foo {
// |
// v
// resourceRoot ----> jar
- val sourceRoot = Target.path(sourceRootPath)
- val resourceRoot = Target.path(resourceRootPath)
+ val sourceRoot = Task.path(sourceRootPath)
+ val resourceRoot = Task.path(resourceRootPath)
val allSources = list(sourceRoot)
val classFiles = compileAll(allSources)
val jar = jarUp(resourceRoot, classFiles)
- def compileAll(sources: Target[Seq[PathRef]]) = {
- new Target.Subprocess(
+ def compileAll(sources: Task[Seq[PathRef]]) = {
+ new Task.Subprocess(
Seq(sources),
args =>
Seq("javac") ++
@@ -37,11 +37,11 @@ object Foo {
).map(_.dest)
}
- def list(root: Target[PathRef]): Target[Seq[PathRef]] = {
+ def list(root: Task[PathRef]): Task[Seq[PathRef]] = {
root.map(x => ls.rec(x.path).map(PathRef(_)))
}
- case class jarUp(roots: Target[PathRef]*) extends Target[PathRef] {
+ case class jarUp(roots: Task[PathRef]*) extends Task[PathRef] {
val inputs = roots