diff options
author | dos65 <qtankle@gmail.com> | 2017-11-28 01:56:42 +0300 |
---|---|---|
committer | Nikolay Tatarinov <5min4eq.unity@gmail.com> | 2017-12-20 01:17:16 +0300 |
commit | 6a7f6cf910362cadf6b39f8c0795c46745e08742 (patch) | |
tree | 5473fc949137771ab3f82cc259a83fb0966555f5 /core/src | |
parent | 2ecfb282365f7fd8168bfb845cdbb403c00e9615 (diff) | |
download | mill-6a7f6cf910362cadf6b39f8c0795c46745e08742.tar.gz mill-6a7f6cf910362cadf6b39f8c0795c46745e08742.tar.bz2 mill-6a7f6cf910362cadf6b39f8c0795c46745e08742.zip |
publishLocal - looks like it works
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/scala/mill/define/Applicative.scala | 3 | ||||
-rw-r--r-- | core/src/main/scala/mill/define/Task.scala | 1 | ||||
-rw-r--r-- | core/src/main/scala/mill/modules/Jvm.scala | 9 | ||||
-rw-r--r-- | core/src/test/scala/mill/eval/JavaCompileJarTests.scala | 2 |
4 files changed, 9 insertions, 6 deletions
diff --git a/core/src/main/scala/mill/define/Applicative.scala b/core/src/main/scala/mill/define/Applicative.scala index 592708cb..32806643 100644 --- a/core/src/main/scala/mill/define/Applicative.scala +++ b/core/src/main/scala/mill/define/Applicative.scala @@ -44,6 +44,8 @@ object Applicative { (cb: (A, B, C, D, E, Ctx) => Z[R]) = mapCtx(zip(a, b, c, d, e)){case ((a, b, c, d, e), x) => cb(a, b, c, d, e, x)} def zipMap[A, B, C, D, E, F, R](a: T[A], b: T[B], c: T[C], d: T[D], e: T[E], f: T[F]) (cb: (A, B, C, D, E, F, Ctx) => Z[R]) = mapCtx(zip(a, b, c, d, e, f)){case ((a, b, c, d, e, f), x) => cb(a, b, c, d, e, f, x)} + def zipMap[A, B, C, D, E, F, G, R](a: T[A], b: T[B], c: T[C], d: T[D], e: T[E], f: T[F], g: T[G]) + (cb: (A, B, C, D, E, F, G, Ctx) => Z[R]) = mapCtx(zip(a, b, c, d, e, f, g)){case ((a, b, c, d, e, f, g), x) => cb(a, b, c, d, e, f, g, x)} def zipMap[A, B, C, D, E, F, G, H, R](a: T[A], b: T[B], c: T[C], d: T[D], e: T[E], f: T[F], g: T[G], h: T[H]) (cb: (A, B, C, D, E, F, G, H, Ctx) => Z[R]) = mapCtx(zip(a, b, c, d, e, f, g, h)){case ((a, b, c, d, e, f, g, h), x) => cb(a, b, c, d, e, f, g, h, x)} def zipMap[A, B, C, D, E, F, G, H, I, R](a: T[A], b: T[B], c: T[C], d: T[D], e: T[E], f: T[F], g: T[G], h: T[H], i: T[I]) @@ -58,6 +60,7 @@ object Applicative { def zip[A, B, C, D](a: T[A], b: T[B], c: T[C], d: T[D]): T[(A, B, C, D)] def zip[A, B, C, D, E](a: T[A], b: T[B], c: T[C], d: T[D], e: T[E]): T[(A, B, C, D, E)] def zip[A, B, C, D, E, F](a: T[A], b: T[B], c: T[C], d: T[D], e: T[E], f: T[F]): T[(A, B, C, D, E, F)] + def zip[A, B, C, D, E, F, G](a: T[A], b: T[B], c: T[C], d: T[D], e: T[E], f: T[F], g: T[G]): T[(A, B, C, D, E, F, G)] def zip[A, B, C, D, E, F, G, H](a: T[A], b: T[B], c: T[C], d: T[D], e: T[E], f: T[F], g: T[G], h: T[H]): T[(A, B, C, D, E, F, G, H)] def zip[A, B, C, D, E, F, G, H, I](a: T[A], b: T[B], c: T[C], d: T[D], e: T[E], f: T[F], g: T[G], h: T[H], i: T[I]): T[(A, B, C, D, E, F, G, H, I)] def zip[A, B, C, D, E, F, G, H, I, J](a: T[A], b: T[B], c: T[C], d: T[D], e: T[E], f: T[F], g: T[G], h: T[H], i: T[I], j: T[J]): T[(A, B, C, D, E, F, G, H, I, J)] diff --git a/core/src/main/scala/mill/define/Task.scala b/core/src/main/scala/mill/define/Task.scala index 7c741487..59782f3d 100644 --- a/core/src/main/scala/mill/define/Task.scala +++ b/core/src/main/scala/mill/define/Task.scala @@ -113,7 +113,6 @@ object Target extends Applicative.Applyer[Task, Task, Result, Ctx]{ val inputs = Seq(a, b, c, d, e, f, g) def evaluate(args: Ctx) = (args[A](0), args[B](1), args[C](2), args[D](3), args[E](4), args[F](5), args[G](6)) } - def zip[A, B, C, D, E, F, G, H](a: Task[A], b: Task[B], c: Task[C], d: Task[D], e: Task[E], f: Task[F], g: Task[G], h: Task[H]) = new Task[(A, B, C, D, E, F, G, H)]{ val inputs = Seq(a, b, c, d, e, f, g, h) def evaluate(args: Ctx) = (args[A](0), args[B](1), args[C](2), args[D](3), args[E](4), args[F](5), args[G](6), args[H](7)) diff --git a/core/src/main/scala/mill/modules/Jvm.scala b/core/src/main/scala/mill/modules/Jvm.scala index 84e75510..ae13ccb2 100644 --- a/core/src/main/scala/mill/modules/Jvm.scala +++ b/core/src/main/scala/mill/modules/Jvm.scala @@ -92,9 +92,9 @@ object Jvm { m } - def createJar(inputPaths: Seq[Path], mainClass: Option[String] = None) + // TODO: outputPath default to ctx.dest + def createJar(outputPath: Path, inputPaths: Seq[Path], mainClass: Option[String] = None) (implicit ctx: Ctx.DestCtx): PathRef = { - val outputPath = ctx.dest rm(outputPath) if(inputPaths.nonEmpty) { mkdir(outputPath/up) @@ -127,11 +127,12 @@ object Jvm { } - def createAssembly(inputPaths: Seq[Path], + // TODO: outputPath default to ctx.dest + def createAssembly(outputPath: Path, + inputPaths: Seq[Path], mainClass: Option[String] = None, prependShellScript: String = "") (implicit ctx: Ctx.DestCtx): PathRef = { - val outputPath = ctx.dest rm(outputPath) if(inputPaths.nonEmpty) { diff --git a/core/src/test/scala/mill/eval/JavaCompileJarTests.scala b/core/src/test/scala/mill/eval/JavaCompileJarTests.scala index 7639d8e2..ee24b04e 100644 --- a/core/src/test/scala/mill/eval/JavaCompileJarTests.scala +++ b/core/src/test/scala/mill/eval/JavaCompileJarTests.scala @@ -40,7 +40,7 @@ object JavaCompileJarTests extends TestSuite{ def resourceRoot = T.source{ resourceRootPath } def allSources = T{ ls.rec(sourceRoot().path).map(PathRef(_)) } def classFiles = T{ compileAll(allSources()) } - def jar = T{ Jvm.createJar(Seq(resourceRoot().path, classFiles().path)) } + def jar = T{ Jvm.createJar(T.ctx().dest, Seq(resourceRoot().path, classFiles().path)) } def run(mainClsName: String) = T.command{ %%('java, "-cp", classFiles().path, mainClsName) |