diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2017-11-22 20:41:35 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2017-11-22 20:41:35 -0800 |
commit | 3a87314737bea39b5d194ad2a9e7a88085011755 (patch) | |
tree | 26efb3ae3326df423376c675913a3a5bed359103 /build.sc | |
parent | c73413a6ce30ba78f6dd34081bdd3d9bb8f2099d (diff) | |
download | mill-3a87314737bea39b5d194ad2a9e7a88085011755.tar.gz mill-3a87314737bea39b5d194ad2a9e7a88085011755.tar.bz2 mill-3a87314737bea39b5d194ad2a9e7a88085011755.zip |
Targets living in cross modules can now be properly discovered, run and cached.
Try out the following commands on our Mill `build.sc` file to exercise this functionality
- `scalaplugin/target/mill run Core.cross[jarA].jar`
- `scalaplugin/target/mill run Core.cross[jarB].jar`
- `scalaplugin/target/mill run Core.cross[jarC].jar`
Diffstat (limited to 'build.sc')
-rwxr-xr-x | build.sc | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -22,10 +22,17 @@ object Core extends ScalaModule { override def sources = pwd/'core/'src/'main/'scala val cross = - for(c <- mill.define.Cross("a", "b", "c")) + for(jarLabel <- mill.define.Cross("jarA", "jarB", "jarC")) yield new mill.Module{ def printIt() = T.command{ - println("PRINTING IT: " + c) + println("PRINTING IT: " + jarLabel) + } + def jar = T{ + val dest = T.ctx().dest + ammonite.ops.mkdir(dest/ammonite.ops.up) + ammonite.ops.cp(Core.jar().path, dest) + + PathRef(dest) } } } |