Build outputs
The three folders a build writes, and which one holds the release set.
A build writes its results into three folders under build/. Each folder has one reader.
| Folder | Holds | Read by |
|---|---|---|
build/distributions/ | the release set | your release process |
build/publication/ | publication-index.json | createRegistry and the publication tasks |
build/reports/forge/ | the canonical report.html and report.json | the developer, the IDE and CI reporters |
The release set
build/distributions/ holds every file a release ships and nothing the build reads back, so a
release process can ship the folder whole. For a resource named Acme Profile at version 1.4.0
with classifier 2024x:
build/distributions/
acme-profile-1.4.0-2024x.zip
com.acme.profile-1.4.0-2024x.zip
acme-profile-1.4.0-2024x-sources.zip
acme-profile-1.4.0-2024x-apidocs.zip
acme-profile-1.4.0-2024x-report.html
acme-profile-1.4.0-2024x-report.json| File | Written by | Present when |
|---|---|---|
<name>.zip | zipResource | always |
<plugin-id>-<version>[-<classifier>].zip | zipPlugin | the project ships a plugin |
<name>-sources.zip | zipSources | the sources { } block names an include; see Package the project sources |
<name>-apidocs.zip | zipApiDocs | Dokka applies; see Generate an API reference |
<name>-report.html, <name>-report.json | generateReport | the report ran and resource.name and resource.humanVersion resolve |
<name> is the resource archive name, built from resource.name, resource.humanVersion and the
publication classifier; see Properties.
Forge publishes only the resource zip and the plugin zip, the two files the publication index names. The other files reach no Maven repository. Your process decides where the release set goes next: a release page, a store or a client. Forge uploads none of it.
A clean build
The release set is exact only after a clean build. build/distributions/ keeps files from earlier
builds until clean runs, so a version bump without clean leaves the previous version's archives
beside the new ones. Build a release with:
./gradlew clean buildThe publication index
createPublicationIndex writes build/publication/publication-index.json, naming the resource zip
and the plugin zip. Publication creates one Maven publication per archive the index names, and
createRegistry ingests the index as the project's own repository. See
Publish a resource.