From 550772d7515757339269c28c41fd0d8109e0fa2c Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Thu, 9 Nov 2017 22:36:47 -0800 Subject: Migrate over to the new `Task`/`Target`/`Command` split --- core/src/test/examples/javac/build.sc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'core/src/test/examples/javac/build.sc') 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 -- cgit v1.2.3