Configuration
Apply the settings plugin as shown in the quickstart.
1import org.buildish.atrmavenbundle.gradleplugin.AtrMavenBundleExtension
2
3plugins {
4 id("org.buildish.atr-maven-bundle.gradle-plugin") version "0.2.0"
5}
6
7extensions.configure<AtrMavenBundleExtension>("atrMavenBundle") {
8 // Defaults: requireSignatures=true, signMissing=false.
9 // Optional; otherwise use the root project's final name/version.
10 baseName.set("my-release")
11 bundleVersion.set("1.0")
12
13 excludeProject(":internal")
14 excludePublication(":library", "experimental")
15}
The equivalent Groovy settings extension is atrMavenBundle { ... }. Exclusions
use exact absolute Gradle project paths and exact publication names; a project
exclusion does not recursively exclude its children. Settings are frozen after
settings evaluation.
The root project’s publications are eligible too. Native Gradle plugin marker
POMs, customized POMs, custom artifacts, platform/BOMs and emitted Gradle module
metadata retain their native publishing behavior. Projects without selected
Maven publications contribute nothing. Required unpublished project dependencies
may still compile; they acquire no publication or bundle payload merely by being
dependencies. The plugin publishes each selected publication to its own local
export repository and does not invoke broad publish, publishToMavenLocal, or
user-configured publishing destinations.
Settings and defaults
| Setting | Default | Meaning |
|---|---|---|
requireSignatures |
true |
Require a nonempty signature for every primary publication file. |
signMissing |
false |
Generate absent primary signatures using the root signatory. |
baseName |
Root project’s final name | Base name used in archive and directory names. |
bundleVersion |
Root project’s final version | Version used in archive and directory names. |
Bundle naming does not change the Maven coordinates or version of a publication. Snapshot publications are eligible too. Selecting an output task chooses a creator and archive/files variant; there is no separate creator-selection DSL.
Policy overrides
The effective Boolean policy uses this precedence:
- Explicit option on
:prepareMavenBundle. - Gradle project property.
- Settings extension value or its default.
The project properties are atrMavenBundle.requireSignatures and
atrMavenBundle.signMissing. Each accepts only true or false, ignoring case.
1./gradlew -PatrMavenBundle.requireSignatures=false :mavenRepositoryZip
2./gradlew :prepareMavenBundle --no-require-signatures --no-sign-missing :mavenRepositoryZip
The preparation options are --require-signatures, --no-require-signatures,
--sign-missing and --no-sign-missing. Place them immediately after the
preparation task.
See checksums and signing for how presence checks and generation interact, and outputs for task names and paths.