From ca1def4d6f5c829701e04f86dacb720bb57f036f Mon Sep 17 00:00:00 2001 From: Andrew Richards Date: Mon, 29 Jul 2019 13:56:01 +0100 Subject: add ability to define jar manifest (#634) * add capability to define jar manifest * Don't use the custom manifest for doc-only jars This is to pass test mill.scalalib.HelloWorldTests.scalaDocOptions * Add JarManifest.Default and fix the build rebase fix --- main/test/src/eval/JavaCompileJarTests.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'main/test') diff --git a/main/test/src/eval/JavaCompileJarTests.scala b/main/test/src/eval/JavaCompileJarTests.scala index 0f9002df..e243b915 100644 --- a/main/test/src/eval/JavaCompileJarTests.scala +++ b/main/test/src/eval/JavaCompileJarTests.scala @@ -2,6 +2,7 @@ package mill.eval import mill.define.{Discover, Input, Target, Task} import mill.modules.Jvm +import mill.modules.Jvm.JarManifest import mill.api.Ctx.Dest import mill.{Module, T} import mill.util.{DummyLogger, TestEvaluator, TestUtil} @@ -9,6 +10,7 @@ import mill.api.Strict.Agg import mill.api.Loose import utest._ import mill._ + object JavaCompileJarTests extends TestSuite{ def compileAll(sources: mill.api.Loose.Agg[PathRef])(implicit ctx: Dest) = { os.makeDir.all(ctx.dest) @@ -39,7 +41,7 @@ object JavaCompileJarTests extends TestSuite{ def classFiles = T{ compileAll(allSources()) } def jar = T{ Jvm.createJar(Loose.Agg(classFiles().path) ++ resourceRoot().map(_.path)) } // Test createJar() with optional file filter. - def filterJar(fileFilter: (os.Path, os.RelPath) => Boolean) = T{ Jvm.createJar(Loose.Agg(classFiles().path) ++ resourceRoot().map(_.path), None, fileFilter) } + def filterJar(fileFilter: (os.Path, os.RelPath) => Boolean) = T{ Jvm.createJar(Loose.Agg(classFiles().path) ++ resourceRoot().map(_.path), JarManifest.Default, fileFilter) } def run(mainClsName: String) = T.command{ os.proc('java, "-Duser.language=en", "-cp", classFiles().path, mainClsName).call() -- cgit v1.2.3