diff options
Diffstat (limited to 'src/test/scala/forge/Main.scala')
-rw-r--r-- | src/test/scala/forge/Main.scala | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/test/scala/forge/Main.scala b/src/test/scala/forge/Main.scala index 99237e32..2ef6083b 100644 --- a/src/test/scala/forge/Main.scala +++ b/src/test/scala/forge/Main.scala @@ -16,38 +16,38 @@ object Main{ val res = evaluator.evaluate(OSet(jar)) println(res.evaluated.collect(mapping)) } - def compileAll(sources: Target[Seq[Path]]) = { + def compileAll(sources: Target[Seq[PathRef]]) = { new Target.Subprocess( Seq(sources), args => Seq("javac") ++ - args[Seq[Path]](0).map(_.toString) ++ + args[Seq[PathRef]](0).map(_.path.toString) ++ Seq("-d", args.dest.toString) ).map(_.dest) } - def list(root: Target[Path]): Target[Seq[Path]] = { - root.map(ls.rec) + def list(root: Target[PathRef]): Target[Seq[PathRef]] = { + root.map(x => ls.rec(x.path).map(PathRef(_))) } - case class jarUp(roots: Target[Path]*) extends Target[Path]{ + case class jarUp(roots: Target[PathRef]*) extends Target[PathRef]{ val inputs = roots - def evaluate(args: Args): Path = { + def evaluate(args: Args): PathRef = { val output = new java.util.jar.JarOutputStream(new FileOutputStream(args.dest.toIO)) for{ root0 <- args.args - root = root0.asInstanceOf[Path] + root = root0.asInstanceOf[PathRef] - path <- ls.rec(root) + path <- ls.rec(root.path) if path.isFile }{ - val relative = path.relativeTo(root) + val relative = path.relativeTo(root.path) output.putNextEntry(new JarEntry(relative.toString)) output.write(read.bytes(path)) } output.close() - args.dest + PathRef(args.dest) } |