From 0ae0f1a5a225ee37b346263867d1e57a2006e790 Mon Sep 17 00:00:00 2001 From: MelanX Date: Sat, 29 Nov 2025 12:55:50 +0100 Subject: [PATCH] Add docs for jarjar integration for main jar task See https://github.com/ModdingX/ModGradle/pull/23 --- wiki/modgradle/docs/meta/setup.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/wiki/modgradle/docs/meta/setup.md b/wiki/modgradle/docs/meta/setup.md index 376a512..d79555b 100644 --- a/wiki/modgradle/docs/meta/setup.md +++ b/wiki/modgradle/docs/meta/setup.md @@ -221,6 +221,25 @@ artifacts { In this example, both sources and javadoc jar-files will be created during the build process. However, only the sources will get published to maven and uploaded to mod hosting websites. +### Using JarJar as the main artifact + +By default, ModGradle uses the `jar` task as the main artifact for publishing and uploading. +You can switch to using the `jarJar` task (and optionally adjust classifiers) like this: + +```groovy +artifacts { + useJarJar(true) +} +``` + +This makes ModGradle use `jarJar` as the main artifact. +With `true`, it also applies the common “thin + bundled” layout: + +- `jar` → `-thin` +- `jarJar` → no classifier + +If you want to use `jarJar` without changing classifiers, call `useJarJar()` without arguments. + ## resources The `resources` block allows to specify in which files parameter expansion should take place.