diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2017-12-04 21:59:13 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2017-12-04 21:59:13 -0800 |
commit | 52f5a07a2b2b3f1885e83d09414aa3da385f4419 (patch) | |
tree | aa8b168383dd7144b2c0aa9d653a97b34e4faabb /core/src/main/scala | |
parent | 422d41498d43ad9b437b2d4460f61849e78bb6fa (diff) | |
download | mill-52f5a07a2b2b3f1885e83d09414aa3da385f4419.tar.gz mill-52f5a07a2b2b3f1885e83d09414aa3da385f4419.tar.bz2 mill-52f5a07a2b2b3f1885e83d09414aa3da385f4419.zip |
Make more stuff use the implicit `T.ctx()`
Diffstat (limited to 'core/src/main/scala')
-rw-r--r-- | core/src/main/scala/mill/modules/Jvm.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/src/main/scala/mill/modules/Jvm.scala b/core/src/main/scala/mill/modules/Jvm.scala index 74eecba4..a2277e36 100644 --- a/core/src/main/scala/mill/modules/Jvm.scala +++ b/core/src/main/scala/mill/modules/Jvm.scala @@ -31,10 +31,11 @@ object Jvm { m } - def createJar(outputPath: Path, inputPaths: Seq[Path], mainClass: Option[String] = None): Option[Path] = { + def createJar(inputPaths: Seq[Path], mainClass: Option[String] = None) + (implicit ctx: Ctx.DestCtx): PathRef = { + val outputPath = ctx.dest rm(outputPath) - if(inputPaths.isEmpty) None - else { + if(inputPaths.nonEmpty) { mkdir(outputPath/up) val jar = new JarOutputStream( @@ -60,8 +61,8 @@ object Jvm { jar.close() } - Some(outputPath) } + PathRef(outputPath) } |