Forge
Reference

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.

FolderHoldsRead by
build/distributions/the release setyour release process
build/publication/publication-index.jsoncreateRegistry and the publication tasks
build/reports/forge/the canonical report.html and report.jsonthe 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
FileWritten byPresent when
<name>.zipzipResourcealways
<plugin-id>-<version>[-<classifier>].zipzipPluginthe project ships a plugin
<name>-sources.zipzipSourcesthe sources { } block names an include; see Package the project sources
<name>-apidocs.zipzipApiDocsDokka applies; see Generate an API reference
<name>-report.html, <name>-report.jsongenerateReportthe 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 build

The 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.

On this page