java.lang.Object
io.github.duckasteroid.gradle.versioning.releaseflow.ReleaseManifest

public final class ReleaseManifest extends Object
The build/release-manifest.json file written by the tagReleaseCandidates / promoteReleaseCandidates aggregator tasks (ReleaseFlowPlugin) - one entry per project that actually got tagged on a given run, read back by the bundled GitHub Actions workflow to turn into one gh release create per entry, instead of guessing a single tag via git describe --tags --exact-match HEAD (which only ever worked when exactly one project released per push).

A plain class with no Gradle dependency, like VersionResolver/ChangelogGenerator - kept separate from the aggregator tasks themselves so the JSON shape is independently testable. Uses Groovy's JsonOutput for serialization (available transitively via the Gradle API, same as groovy.lang.Closure elsewhere in this project) rather than pulling in a separate JSON library for this one small, flat shape.

  • Constructor Details

    • ReleaseManifest

      public ReleaseManifest()
  • Method Details

    • add

      public void add(String module, String tag, String changelog, List<String> supersededTags, String artifactsDir)
      Parameters:
      module - the Gradle project path, e.g. ":" for the root or ":api" for a subproject
      tag - the full tag name that was just created, including its prefix
      changelog - the generated changelog's path, relative to the repo root
      supersededTags - this cycle's previous release-candidate tags whose GitHub Release should be deleted now that tag supersedes them (see the releaseCandidates { } extension) - empty when pruning is disabled or nothing qualifies. The tags themselves are never deleted, only their GitHub Release.
      artifactsDir - this project's own build/libs directory, relative to the repo root, for the workflow to glob jars out of and attach to the GitHub Release - see the note on why this is a directory to glob rather than literal file names in ReleaseFlowPlugin where it's computed.
    • add

      public void add(String module, String tag, String changelog)
      Equivalent to add(String, String, String, List, String) with no supersededTags/artifactsDir.
    • add

      public void add(String module, String tag, String changelog, List<String> supersededTags)
      Equivalent to add(String, String, String, List, String) with no artifactsDir.
    • isEmpty

      public boolean isEmpty()
    • size

      public int size()
    • toJson

      public String toJson()
    • writeTo

      public void writeTo(File file)
      Writes this manifest as JSON to file, creating parent directories as needed.