summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/src/mill/modules/Jvm.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/main/src/mill/modules/Jvm.scala b/main/src/mill/modules/Jvm.scala
index b4f7fa94..4c26b297 100644
--- a/main/src/mill/modules/Jvm.scala
+++ b/main/src/mill/modules/Jvm.scala
@@ -209,6 +209,19 @@ object Jvm {
m
}
+ /**
+ * Create a jar file containing all files from the specified input Paths,
+ * called out.jar in the implicit ctx.dest folder. An optional main class may
+ * be provided for the jar. An optional filter function may also be provided to
+ * selectively include/exclude specific files.
+ * @param inputPaths - `Agg` of `Path`s containing files to be included in the jar
+ * @param mainClass - optional main class for the jar
+ * @param fileFilter - optional file filter to select files to be included.
+ * Given a `Path` (from inputPaths) and a `RelPath` for the individual file,
+ * return true if the file is to be included in the jar.
+ * @param ctx - implicit `Ctx.Dest` used to determine the output directory for the jar.
+ * @return - a `PathRef` for the created jar.
+ */
def createJar(inputPaths: Agg[Path],
mainClass: Option[String] = None,
fileFilter: (Path, RelPath) => Boolean = (p: Path, r: RelPath) => true)