Configuration Reference

All action inputs and config-file options for Buildish Mammoth Cache for Gradle and Maven.

The action is available in two build-tool-specific variants that share most inputs:

  • Gradle — buildish-tooling/buildish-mammoth-cache/actions/github/gradle@5c0dee59a9c967b022c674b2f442f181511c8df7
  • Maven — buildish-tooling/buildish-mammoth-cache/actions/github/maven@5c0dee59a9c967b022c674b2f442f181511c8df7

The action ref pins a release; see Pin a release.

Most workflows set only a few of the basic inputs listed first in the matrix below. Start from a complete workflow instead of this reference:

All inputs described in Common inputs apply to both. Inputs described under Gradle-only inputs or Maven-only inputs are accepted only by the corresponding action and ignored (or rejected) by the other.

The following compact matrix is generated from the typed public contract. The detailed sections below add examples and rationale; the parity test ensures metadata, readers, config-file keys, runtime outputs, and these reference rows cannot silently diverge.

Canonical input matrix

Most workflows need only the basic inputs. Advanced inputs tune behavior or cover special setups.

Basic inputs

Input Action Default Config file Meaning
config-file Gradle, Maven event-dependent or unset no Optional workspace-relative JSON or YAML configuration file. Direct action inputs override file values; secrets and GitHub context inputs are direct-only.
cache-enabled Gradle, Maven true yes Enables cache orchestration. Accepted values: true or false.
read-only Gradle, Maven event-dependent or unset yes Disables cache and delta writes. Pull-request events default to true; repository config may make the policy stricter, but only a direct workflow input may lower that floor.
job-mode Gradle, Maven standalone yes Cache coordination mode: standalone, distributed-worker, distributed-aggregator, or prepare-only.
dependent-jobs Gradle, Maven event-dependent or unset yes Comma- or newline-separated worker job names consumed by a distributed aggregator.
github-job-name Gradle, Maven event-dependent or unset no Optional stable job-name override used for distributed artifact coordination. Matrix cells get a distinct name from their matrix values by default.
github-needs Gradle, Maven event-dependent or unset no Recommended for distributed aggregators: pass toJSON(needs) so missing workers are reported as skipped, failed or uploading nothing, and listed jobs outside needs are flagged.
cache-key-prefix Gradle, Maven buildish-mammoth-cache- yes Namespace prefix for action-owned cache families; build, partition, ref-lineage, and generation identity are appended automatically.
cache-partitions Gradle, Maven event-dependent or unset yes JSON array of cache partition overrides and custom partitions. Hard safety exclusions remain non-overridable.

Advanced inputs

Input Action Default Config file Meaning
base-directory Gradle, Maven . yes Repository-relative project base directory. Rooted paths and paths that escape the workspace are rejected.
overlay-fs Gradle, Maven true yes Allows OverlayFS for eligible cache operations. Set to false to use the ordinary cache path.
dependency-cache-layer Gradle true yes Enables eligible Gradle wrapper workers to use a dependency seed and selects a family whose publishers retain eligible partitions. All cooperating jobs use the same value.
export-layer-environment Gradle true yes Exports the activated Gradle dependency seed as GRADLE_RO_DEP_CACHE for later steps. False emits only the seed-path output; the workflow configures every consumer.
worker-artifact-retention-days Gradle, Maven 7 yes Requested worker artifact retention in whole days (1–400). Backend limits may shorten it; shorter retention narrows the retry window.
allow-duplicate-dependent-delta-paths Gradle, Maven false yes Allows a distributed aggregator to resolve non-identical overlapping worker paths by newest modification time. Exact same-content overlaps remain safe without this option.
allow-missing-dependent-jobs Gradle, Maven true yes Lets a distributed aggregator merge the available workers when a dependent job uploaded no artifact, for example because it was skipped. A missing job prevents full sweep coverage. Set to false to fail aggregation instead.
cache-max-directory-entries Gradle, Maven 100000 yes Maximum direct entries per managed directory. Must be a positive safe integer.
cleanup-enabled Gradle, Maven true yes Enables restore cleanup and timestamp garbage collection.
restore-cleanup-mode Gradle, Maven none yes Restore-time cleanup mode: none or prune-managed.
cache-gc-mode Gradle, Maven timestamp yes Managed-cache GC: timestamp uses file age and current-build activity; off disables deletion only.
cache-gc-older-than-days Gradle, Maven 14 yes File-mtime age threshold for timestamp GC, not historical inactivity. Must be at least 2 days.
dependency-gc-interval-days Gradle, Maven 3 yes Days between completed periodic GC sweeps.
dependency-gc-force-grace-days Gradle, Maven 1 yes Additional days before an aggregator can sweep with incomplete worker coverage. Use off to disable forcing.
github-token Gradle, Maven event-dependent or unset no Optional GitHub token for authenticated API requests. Pass secrets directly, never through repository config.
github-job-check-run-id Gradle, Maven event-dependent or unset no Optional check-run ID used to create a direct current-job link.
github-event-name Gradle, Maven event-dependent or unset no Optional triggering-event override for reusable workflows. Pass the trusted caller event.
github-ref-name Gradle, Maven event-dependent or unset no Optional resolved-ref override for reusable workflows.
github-default-branch Gradle, Maven event-dependent or unset no Optional repository default-branch override for reusable workflows.
github-matrix Gradle, Maven ${{ toJSON(matrix) }} no Matrix values of this cell, used with github-job-total to derive a distinct job name per matrix cell. Leave the default.
github-job-total Gradle, Maven ${{ strategy.job-total }} no Number of cells of this matrix job. A job with one cell keeps its job ID as name. Leave the default.
process-all-wrapper-files Gradle false yes Processes every matching Gradle wrapper properties file. Cannot be combined with wrapper-properties-files.
wrapper-properties-glob Gradle **/gradle/wrapper/gradle-wrapper.properties yes Repository-relative Gradle wrapper properties discovery glob.
wrapper-properties-files Gradle event-dependent or unset yes Comma- or newline-separated explicit Gradle wrapper properties files relative to base-directory.
gradle-user-home Gradle event-dependent or unset yes Gradle user home to manage. The current version accepts only the runner default.
setup-java Gradle false yes Reserved compatibility flag. The current version rejects true; run actions/setup-java first.
maven-user-home Maven event-dependent or unset yes Absolute or working-directory-relative Maven user home to manage, including repository/ and wrapper/dists/; defaults to MAVEN_USER_HOME or ~/.m2.

Canonical output matrix

Output Meaning
gradle-ro-dep-cache Invocation-owned Gradle read-only dependency cache path, or empty when layered restore is inactive.
cache-family-key Stable compatibility family shared by structurally compatible generations.
cache-lineage-prefix Current-ref prefix used to restore the newest immutable generation.
base-cache-restore-status Classified base-cache restore outcome for prepare.
dependency-gc-due Whether periodic GC is due for the selected generation. Values are true, false, or unknown.
restored-cache-key Exact immutable generation restored during prepare, when any.
read-only Whether cache and delta writes are disabled.
job-mode Effective standalone or distributed job mode.
dependent-delta-status Dependent-delta outcome: not-configured, applied, or skipped-read-only.
dependent-delta-artifact-count Number of dependent worker artifacts applied during prepare.

Common inputs

config-file

  • Default: unset
  • Optional workspace-relative .json, .yml, or .yaml file containing a top-level object.
  • Config-file keys use the same kebab-case names as the action inputs.
  • Direct action inputs override values loaded from the file.
  • dependent-jobs and wrapper-properties-files may be either strings or arrays in the file.
  • cache-partitions may be expressed as a native YAML/JSON array in the file instead of a serialized JSON string.
  • github-token is intentionally rejected in config files; pass secrets directly via action inputs or environment variables.
  • The resolved file must remain inside the workspace after symlink resolution.

base-directory

  • Default: .
  • Repository-relative base directory for wrapper discovery and other project-relative paths.
  • Windows-style relative paths using \ are accepted and normalized to internal POSIX-style paths.
  • Absolute/rooted paths are rejected, including C:\repo, \Windows\System32, and \\server\share.
  • Must remain inside the repository workspace.

cache-enabled

  • Default: true
  • Accepted values: true, false
  • Enables or disables cache orchestration.

overlay-fs

  • Defaults to true. Accepts true or false.
  • Set overlay-fs: false in the action inputs or repository configuration to skip mount probing and allow eligible Gradle workers to use the read-only seed while GC is fresh.
  • Eligible warm, writable Linux Gradle wrapper workers try OverlayFS while GC is fresh. Mammoth mounts the job’s Gradle user home and uses the upper layer to find changes. It captures affected workspaces from the merged view and captures complete dependency metadata for the designated writer.
  • Existing unmanaged files remain visible to the build. Post unmounts the home and discards the build’s local changes after cache capture. Use overlay-fs: false if you need those changes to remain on disk after post.
  • An eligible warm, writable Linux Maven worker mounts only the local repository/ directory under maven-user-home. Maven settings and wrapper distributions use their usual paths. Mammoth captures complete changed coordinates, including repository-origin records, then unmounts and discards the worker’s local repository changes. Use overlay-fs: false to keep the ordinary repository lifecycle.
  • OverlayFS workers can miss reads of inherited files. Their usage is ineligible for a periodic sweep.
  • Warm, writable standalone and aggregator jobs can also use OverlayFS. Publishers use the ordinary path when timestamp GC is active, restore cleanup prunes managed files, or enabled cleanup has purge rules. Post discards local writes within the mount after publication. Set overlay-fs: false to keep those writes on disk after post.
  • On GitHub-hosted Linux, Mammoth uses noninteractive sudo for mount operations. On other Linux runners, it uses the action process’s existing permissions. After a recoverable mount failure, Mammoth uses the ordinary writable cache path.
  • Mammoth requests the default fsync=auto behavior explicitly on Linux 7.0 and newer. Earlier kernels use their default sync behavior.

read-only

  • Default: event-dependent
  • Accepted values: true, false
  • Defaults to true for pull_request / pull_request_target.
  • Defaults to false for other events.
  • A repository config file may set true, but cannot set false to lower the pull-request safety floor. Only a direct workflow input can make that explicit trusted-workflow choice.
  • Prevents remote cache publication and workflow-artifact exchange.
  • Post skips cache activity scans and publication. Activity statistics are reported as unavailable. Snapshot counts describe prepare.
  • Local restore/extraction, snapshot replacement and integrity validation, provisioning, hooks, build reports and bounded lifecycle records remain active. Local cache files remain writable.

job-mode

  • Default: standalone
  • Supported values:
    • standalone
    • distributed-worker
    • distributed-aggregator
    • prepare-only
  • Controls cache coordination behavior.
  • Use prepare-only in a planning job to emit dependency-gc-due before selecting worker jobs. It reads only the generation record and skips cache installation, build-tool provisioning, and cache publication. See periodic GC in distributed jobs for wiring the output into a workflow.

dependent-jobs

  • Comma- or newline-separated Mammoth job names consumed by a distributed aggregator.
  • Defaults to empty. Mammoth uses the list both to select ordinary worker envelopes and to check coverage for a complete periodic sweep. List every worker, including conditional ones; see allow-missing-dependent-jobs for jobs that did not upload.
  • Use the workflow job IDs, the derived names of matrix cells, or the exact names supplied by github-job-name. An empty list cannot establish full coverage. See periodic GC in distributed jobs.

worker-artifact-retention-days

  • Default: 7
  • Positive whole-number days from 1 to 400. Repository, organization, and backend limits may shorten the requested period; availability for the full period is not guaranteed.
  • Applies to new distributed worker artifact uploads for both Gradle and Maven. Producers may request different periods without affecting cache identity or envelope compatibility.
  • Shorter retention reduces artifact residence and narrows the selective or aggregator-only retry window. Expired workers must be rerun before aggregation can succeed.
  • Successful aggregation retains worker envelopes. Base cache expiry and timestamp GC are independent.
  • For a one-day example, see distributed jobs.

cache-key-prefix

  • Default: buildish-mammoth-cache-

  • Must start with an alphanumeric character.

  • Remaining characters may only be letters, numbers, ., _, or -.

  • Changes only the namespace prefix. The action always appends build tool, schema, partition, storage-format, ref-lineage, and immutable-generation identity.

  • OS and architecture share by default for both tools. To isolate them, use a workflow input:

    1cache-key-prefix: project-${{ runner.os }}-${{ runner.arch }}-
    
  • Every participating worker and aggregator must resolve the same prefix to share. GitHub expressions belong in workflow YAML; config-file strings are literal.

  • Maven local installs with environment-dependent bytes at identical coordinates require distinct coordinates or an explicitly isolated prefix. Java versions share by default too; include a chosen Java identity in the prefix when needed.

cache-partitions

  • Default: empty
  • Optional JSON array of cache partition overrides and custom partitions.
  • In config-file, this may also be a native YAML/JSON array instead of a serialized string.
  • Each object contains:
    • id: lowercase letters, numbers, and - only
    • includes: array of cache-root-relative include globs; required for custom partitions, inherited from the preset when omitted on a built-in
    • excludes: optional array of cache-root-relative exclude globs
    • optional publication, writer, conflict-handling, read-only-layer and purgeableGlobs; see below and Cache partitions
  • A supplied includes or excludes list replaces the built-in list.
  • Setting includes: [] disables a built-in partition.
  • Custom partitions must have at least one include glob.
  • Hard safety excludes are always enforced even when a partition is overridden.

cache-max-directory-entries

The default is 100000. Set a positive safe integer as a workflow input or in config-file. A direct workflow value takes precedence. Main records the value for post so the same invocation uses one limit.

The limit applies to direct children of each enumerated directory. Native listings count entries before filtering them. Merged and staged views also have per-directory bounds. A directory beyond the limit fails the affected phase with its logical path and the configured allowance. Narrow managed directories or increase the allowance when the diagnostic indicates directory breadth.

For an ordinary aggregate Gradle base restore, a read-only job or distributed worker can move an intact staged directory without listing its descendants. The limit applies to directories that restore actually enumerates, including merge boundaries. A writable standalone job or aggregator also enumerates restored entries when building the publication comparison, so it can hit the limit deeper in the same cached subtree.

The active name and decoded-record working budgets are independent of this setting. Wide, deep, long-name or high-fan-in workloads can exhaust those budgets at a lower entry count. This input gives no repository-wide file limit or process memory guarantee.

cleanup-enabled

  • Default: true
  • Accepted values: true, false
  • Enables restore cleanup and timestamp garbage collection. When false, both are skipped even if their individual modes request cleanup.

cache-gc-mode

  • Default: timestamp
  • Supported values: off, timestamp
  • timestamp enables periodic sweeps of inherited files in managed aggregate partitions before a writable standalone or aggregator job saves the base cache. A sweep can evict an old file when capture observed no activity. The existing worker-local cleanup and single-writer snapshot rules still apply.
  • Activity is best effort. It uses ctime, mtime, and atime relative to the post-prepare cutoff. Filesystem or clock behavior can hide access. Gradle or Maven build-cache hits can also skip work that would have read a dependency. GC can then evict a dependency that a later build needs to download again.
  • off disables timestamp eviction and reports GC as fresh. Tracking, exchange, and otherwise required publication continue.
  • Set off when jobs must retain rarely used old cache entries, for example offline-style builds that cannot redownload pruned dependencies.

cache-gc-older-than-days

  • Default: 14
  • Minimum: 2
  • Age threshold for cache-gc-mode: timestamp.
  • Grace measures file age, not historical inactivity. Deferred/coalesced atime and noatime can hide current use.
  • Increase this value if your Gradle or Maven build uses a large dependency set with artifacts that are valid but touched infrequently.

dependency-gc-interval-days

  • Default: 3. Accepts a positive duration in days, including fractions.
  • Measured from the last completed sweep in the selected cache generation. A generation with no recorded completion is due immediately. When restore falls back to the default ref, the schedule uses that generation’s timestamp.
  • A successful sweep advances the timestamp even if every partition object can be reused. Ordinary publication carries the previous timestamp forward.

dependency-gc-force-grace-days

  • Default: 1. Accepts a nonnegative duration in days, including fractions, or off.
  • An aggregator can sweep with incomplete coverage after this grace period elapses past the regular due time. With the defaults that is four days after the last completed sweep. 0 allows forcing as soon as GC is due. A generation with no recorded completion can be forced immediately unless forcing is off.
  • A forced sweep still requires an admitted base, usable writable capture, and successful publication. The aggregator still applies its ordinary worker artifact requirements.

restore-cleanup-mode

  • Default: none
  • Supported values: none, prune-managed
  • prune-managed only acts after a base-cache hit.
  • It can remove managed leftovers covered by the selected, validated restore. Prepare rejects preexisting managed files independently of this setting. A missing object leaves that partition cold and supplies no cleanup authority.
  • It never deletes files outside the action-managed partition space.
  • It is intentionally an opt-in because it is more destructive and may increase restore time.

allow-duplicate-dependent-delta-paths

  • Default: false
  • Accepted values: true, false
  • When true, the aggregator resolves non-identical overlapping worker paths by newest modification time.
  • Exact same-content overlaps merge safely without this option.
  • When false, non-identical path conflicts are errors.
  • Only relevant for distributed aggregator jobs.

For Maven files under repository/, directory consistency takes precedence: workers updating the same directory must provide identical managed path sets, content, and sizes by default. This option cannot select a newer conflicting origin marker or combine different directory views. See Maven caching patterns.

allow-missing-dependent-jobs

  • Default: true
  • Accepted values: true, false
  • When true, a distributed aggregator warns about each job in dependent-jobs that uploaded no envelope, for example because it was skipped, failed before the Mammoth step, or was cancelled before its post step. It merges the available envelopes. Snapshot partitions of a missing writer keep the previous snapshot.
  • A missing job always prevents full sweep coverage, so no complete sweep runs in that execution. A forced sweep after the grace period still applies.
  • When false, a missing envelope fails aggregation. Use it to detect a misspelled job name or a missing needs entry early.
  • Malformed, ambiguous or incompatible envelopes always fail aggregation.
  • Only relevant for distributed aggregator jobs.

Partition publication and metadata writers

The existing cache-partitions input also accepts publication and writer on individual entries. Gradle’s enabled dependency-metadata preset defaults to single-writer; other partitions use aggregate. A standalone job is automatically its own writer. For distributed jobs, put this same configuration in every participating job, preferably using a shared config file:

1cache-partitions:
2  - id: dependency-metadata
3    writer: worker-a

Omit includes and excludes to inherit the built-in patterns. Explicit lists replace the corresponding defaults; an empty include list disables a built-in. Custom partitions must supply nonempty includes and can opt into publication: single-writer with their own writer. A writer is a trimmed producer identity: the job ID, a matrix cell’s derived name, or an explicit github-job-name; see Matrix jobs.

writer identifies an optional snapshot contribution. It does not make an entry in dependent-jobs optional. If a job is also listed there for ordinary artifacts, its envelope remains required. See the distributed guide for complete workflows, skipped writers, fallback, and configuration compatibility.

Partition conflict handling

Each cache-partitions entry accepts conflict-handling: default, choose-worker-directory, or choose-worker-entry. Omission inherits the preset policy. The built-in Gradle groovy-dsl, kotlin-dsl, transforms-metadata, dependencies-accessors and zinc-compiler-bridges partitions default to choose-worker-directory; build-cache defaults to choose-worker-entry. Other built-ins and custom partitions default to strict handling. Explicit default clears an inherited selection policy.

1cache-partitions:
2  - id: repository
3    conflict-handling: choose-worker-directory

choose-worker-directory supports aggregate Maven partitions whose include globs all start with repository/, and aggregate Gradle partitions whose includes select DSL/transform workspaces or the ordinary legacy-script/generated-API-JAR paths in the built-in Kotlin partition. Selection applies only to recognized workspace roots; ordinary files remain strict. Configure the same policy in every producer and aggregator. The effective policy is part of the partition’s compatibility key, so changing it starts only that partition cold.

choose-worker-entry supports aggregate Gradle build-cache partitions with includes rooted at caches/build-cache-*/ or a literal numeric format directory. It selects one unchanged archive per direct 32-lowercase-hex key. Other filenames retain ordinary strict handling.

Both selection policies pick one producer per unit, a complete workspace, archive or Maven directory, by the smallest producer job name, and discard the other views. They take precedence over allow-duplicate-dependent-delta-paths. They select a winner even if outputs differ under the same key, and Maven selection can lose classifiers, origin entries or local installs supplied only by another worker, so offline builds may fail. Use default to reject such conflicts instead. The exact unit rules, ordering and failure cases are in Conflict handling policies.

github-token

  • Default: unset (falls back to GITHUB_TOKEN when available)
  • Used for authenticated requests to the configured GitHub API host. The Gradle action uses these headers for authenticated wrapper downloads; provider integrations may also use them.
  • Direct-only: config files reject this secret-bearing input.
  • Never written to summaries or persisted post-action state.

github-event-name

  • Default: unset (the action reads GITHUB_EVENT_NAME from the runner environment)
  • Reusable workflows only. When a workflow is triggered via workflow_call, GitHub sets GITHUB_EVENT_NAME to workflow_call rather than the original caller’s event name. Pass ${{ github.event_name }} from the caller workflow to restore the correct value.
  • Affects isPullRequest detection and the default read-only behavior on pull-request events.
  • Example:
    1github-event-name: ${{ github.event_name }}
    

github-job-name

  • Default: unset. The action uses GITHUB_JOB, and for a matrix job with more than one cell <GITHUB_JOB>-<matrix values>; see Matrix jobs.
  • Reusable workflows. Assigns a stable, predictable job name for cache coordination and artifact naming, independent of the GitHub Actions job key or matrix label. In a matrix job, give each cell its own value.
  • Example:
    1github-job-name: aggregator
    

github-needs

  • Default: unset. Recommended on distributed aggregators.
  • Pass ${{ toJSON(needs) }}. GitHub does not allow needs in action defaults, so the workflow must pass it.
  • Diagnostics only: selection and sweep coverage still follow dependent-jobs.
  • A listed job without a worker artifact is reported as skipped, failed, cancelled or “succeeded without an artifact”. A job that succeeded without an artifact usually lacks the Mammoth step or uses another producer name, which produces a warning.
  • Listed jobs that match no job in needs are shown in the summary, and warned about when they are missing. A name matches its job ID, or a job ID followed by -, as for matrix cells.
  • Example:
    1github-needs: ${{ toJSON(needs) }}
    

github-matrix and github-job-total

  • Defaults: ${{ toJSON(matrix) }} and ${{ strategy.job-total }}. Leave them unset.
  • Give each cell of a matrix job with more than one cell a distinct producer name. An explicit github-job-name takes precedence. See Matrix jobs.

github-ref-name

  • Default: unset (the action resolves the ref name from GITHUB_REF_NAME and GITHUB_REF; on pull requests that is <n>/merge, and the base branch from the event payload is an additional restore fallback)
  • Reusable workflows only. When a workflow is triggered via workflow_call, the ref context visible inside the reusable workflow may differ from the caller’s. Pass the resolved ref name from the caller workflow to ensure cache keys use the correct branch or tag.
  • Example:
    1github-ref-name: ${{ github.ref_name }}
    

github-default-branch

  • Default: unset (the action reads the default branch from the event payload or GITHUB_DEFAULT_BRANCH)
  • Reusable workflows only. Pass the caller’s default branch so that cache key fallbacks target the correct base branch.
  • Example:
    1github-default-branch: ${{ github.event.repository.default_branch }}
    

Outputs

Both actions expose the same cache lifecycle outputs after prepare:

Output Meaning
cache-family-key Structural compatibility family, without ref or generation identity
cache-lineage-prefix Current-ref prefix used for newest-generation restore
base-cache-restore-status feature-unavailable, miss, current-lineage-hit, fallback-lineage-hit, current-lineage-partial-hit, or fallback-lineage-partial-hit
restored-cache-key Selected generation with at least one restored/explicit-empty partition, or empty on a miss
read-only Effective write policy as true or false
job-mode Effective mode for ordinary prepare
dependency-gc-due Whether a sweep is due for the selected generation, as true, false, or unknown
dependent-delta-status not-configured, applied, or skipped-read-only
dependent-delta-artifact-count Number of worker artifacts applied during prepare

On a cold retry, a reused frozen miss means no base was selected; it does not imply another service lookup. Historical backend unavailability is not stored solely for reporting. Freshly observed unavailability reports feature-unavailable. A generation whose partitions are all missing is also a miss with no restored key; an explicitly empty partition counts as a successful restore.

dependency-gc-due is available in all job modes, including read-only jobs. true means the generation is due. false means it is fresh or timestamp GC is disabled. unknown means no generation record could be selected and admitted. An admitted record supplies the due signal even if its partition objects are missing. prepare-only emits only this output. Each participant checks the generation it selects during its own prepare.

Generation keys are finalize outcomes and are intentionally not planned prepare outputs. The job summary and finalize log report the exact key only after a successful publication.


Gradle-only inputs

dependency-cache-layer

  • Default: true.
  • Use the same value in every cooperating publisher and worker. It selects a distinct cache family. Periodic GC applies to aggregate dependency partitions within that family.
  • Set false across cooperating jobs to use the ordinary Gradle cache family. Upgrading an ordinary family to the new default starts the layered family cold unless caches from a previous opt-in are available.
  • Activation requires a writable distributed worker, a selected wrapper, restore-cleanup-mode: none, no selected single-writer ownership, and both dependency partitions in the supported layout. Other cases use the full ordinary installation. Gradle chooses which restored metadata it can use.
  • Direct true/false values override config-file true/false values. The runtime applies the default after merging inputs so a config-file opt-out takes effect.
  • See Gradle dependency layer for the consumer contract.

export-layer-environment

  • Default: true, resolved at runtime so config-file false is honored. Direct true/false values override the file; absence in both places enables export.
  • Active prepare emits gradle-ro-dep-cache and normally exports GRADLE_RO_DEP_CACHE for subsequent steps. False emits only the output; configure that environment variable on every consuming Gradle step yourself. Inactive prepare emits an empty output.
  • An existing nonempty GRADLE_RO_DEP_CACHE conflicts with eligible layered prepare and fails before provisioning or backend access.

process-all-wrapper-files

  • Default: false
  • Accepted values: true, false
  • Scans for every matching wrapper properties file under base-directory.
  • Cannot be combined with wrapper-properties-files.

wrapper-properties-glob

  • Default: **/gradle/wrapper/gradle-wrapper.properties
  • Repository-relative discovery glob used beneath base-directory.
  • Windows-style relative paths using \ are accepted and normalized before evaluation.
  • Absolute/rooted paths are rejected, including drive-prefixed, rooted, and UNC paths.

wrapper-properties-files

  • Default: empty
  • Comma- or newline-separated explicit gradle-wrapper.properties files.
  • Paths are relative to base-directory.
  • Windows-style relative paths using \ are accepted and normalized to internal POSIX-style paths.
  • Absolute/rooted paths are rejected, including drive-prefixed, rooted, and UNC paths.
  • Entries must be explicit file paths, not globs.

gradle-user-home

  • Default: $GRADLE_USER_HOME when set, otherwise $HOME/.gradle
  • To use a dedicated home, set GRADLE_USER_HOME for both the action and the build. If you also supply gradle-user-home, its resolved path must match that environment value, or the runner default when the environment variable is unset.
  • Put required user-home gradle.properties and init scripts in the selected home, or supply their configuration explicitly. Keep them outside enabled partitions.
  • Use a fresh dedicated home per invocation on persistent runners. Mammoth keeps local state and staging in a sibling .mammoth.<id> directory. The parent must be writable by the runner and the home and sibling must share a filesystem. Keep the sibling through post.

setup-java

  • Default: false
  • Reserved compatibility flag. In v1, setting true fails intentionally.
  • Run actions/setup-java before this action instead.

Maven-only inputs

maven-user-home

  • Default: $MAVEN_USER_HOME when set, otherwise $HOME/.m2
  • Accepts an absolute path or a path resolved from the action process working directory.
  • The managed root contains both the Maven local repository at repository/ and Maven Wrapper distributions at wrapper/dists/; do not pass the repository/ directory itself.
  • Configure Maven itself to use -Dmaven.repo.local=<home>/repository (or the equivalent localRepository setting). Maven Wrapper uses MAVEN_USER_HOME for its distribution base. To use a settings file in the dedicated home, pass its path with -s.
  • The managed area must start empty. Keep the selected home exclusive through prepare, build and post. See dedicated-home examples.
  • Use a fresh dedicated home per invocation on persistent runners. Mammoth keeps local state and staging in a sibling .mammoth.<id> directory. The parent must be writable by the runner and the home and sibling must share a filesystem. Keep the sibling through post.