Configuration reference
Everything you can set on the Maven plugin (blastradius:select, version 0.4.0) and the matching Gradle extension, plus how to wire it into CI.
Build modes
Decided fresh on every invocation; never configured by hand.
| Mode | When | What happens |
|---|---|---|
TRACK | Current commit is baseRef (or -Dblastradius.mode=track) | Full suite runs untouched; a subprocess rebuilds the index for next time. |
SELECT | Not baseRef, and a usable index exists for the merge base | Surefire is narrowed to the affected tests. |
FALLBACK | Not baseRef, and no usable index | Full suite runs. Reason printed: MISSING, UNREADABLE, FORMAT_VERSION_MISMATCH, ANCHOR_UNREACHABLE, ANCHOR_MISMATCH, MERGE_BASE_UNAVAILABLE, INTERNAL_ERROR. |
Parameters
| Parameter | CLI property | Default | Meaning |
|---|---|---|---|
baseRef | -DbaseRef | required | Target Git reference (main, origin/main, a tag). Non-target builds compare from its merge base with HEAD. |
indexPath | -DindexPath | .blastradius/index.json | Index file template; the merge-base SHA is inserted before the filename. Rejected if it resolves outside the project. |
indexStore | -DindexStore | file | file keeps indexes in the workspace; s3 shares them between runners. |
s3Bucket | -Ds3Bucket | — | Required when indexStore=s3. |
s3Prefix | -Ds3Prefix | empty | Optional key prefix. |
s3Region | -Ds3Region | — | Required when indexStore=s3; used to sign requests. |
s3Endpoint | -Ds3Endpoint | — | Optional S3-compatible endpoint, e.g. MinIO (path-style access). |
| — | -Dblastradius.mode=track | — | Force TRACK, e.g. to pre-warm the index. |
| — | -Dblastradius.explain=true | false | Print the per-test decision listing. |
| — | -Dblastradius.directInvocationFallback=false | true | Disable the one-hop fallback for a project class a test executed that directly invokes a changed class. It can conservatively select an extra test. |
indexPath is one shared namespace for the whole reactor: configure it once at the root.
CI: cache the index
The trunk job writes .blastradius/; the pull-request job restores it. Cache it like ~/.m2. S3 is not required. If a PR cannot restore an index, Blastradius runs the full suite.
steps:
- uses: actions/checkout@v7
- name: Restore Blastradius index
id: blastradius-index
uses: actions/cache/restore@v4
with:
path: .blastradius
key: blastradius-index-${{ runner.os }}-${{ github.sha }}
restore-keys: |
blastradius-index-${{ runner.os }}-
- run: mvn -B --no-transfer-progress verify
- name: Save Blastradius index from main
if: ${{ github.ref == 'refs/heads/main' && success() && steps.blastradius-index.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v4
with:
path: .blastradius
key: blastradius-index-${{ runner.os }}-${{ github.sha }}
Fetch enough Git history to find the merge base. Never put credentials under .blastradius/: Actions caches are readable by pull-request workflows.
Shared S3 index store
Use it when trunk and PR jobs cannot share a workspace cache.
<configuration>
<baseRef>main</baseRef>
<indexStore>s3</indexStore>
<s3Bucket>ci-dependency-indexes</s3Bucket>
<s3Prefix>blastradius</s3Prefix>
<s3Region>eu-central-1</s3Region>
</configuration>
Credentials come from the AWS SDK default chain (environment, OIDC, profile, instance role). Prefer GitHub OIDC with a short-lived role over long-lived keys. The writer role needs s3:GetObject and s3:PutObject on the prefix; a PR needs only s3:GetObject. Do not grant either to untrusted fork PRs: those fall back to the full suite.
Gradle
The plugin ID is io.github.baokhang83.blastradius. Applying it configures every Java Test task; run the normal ./gradlew test. Publication to the Gradle Plugin Portal is pending, so it must currently be built from source.
blastradius {
baseRef = 'main'
indexStore = 's3' // optional
s3Bucket = 'ci-dependency-indexes'
s3Prefix = 'blastradius'
s3Region = 'eu-central-1'
// s3Endpoint = 'https://minio.example.com'
// directInvocationFallback = false
}
Files and console output
Add .blastradius/ to .gitignore.
<full-sha>/index.json— the dependency map a TRACK build writes and a SELECT build reads.last-build-report.json— machine-readable selection report: mode, changed files, per-test decisions, counts, reason counts, estimated time saved.last-build-report.html— self-contained view of the same report.metrics.jsonl— append-only samples for charting builds over time.test-timings.json— last observed duration per test, used for the time-saved estimate.
[blastradius] SELECT — index built from 4e02156 (2026-07-10T03:03:04Z)
[blastradius] 1 / 2 tests selected (50.0% skipped)
[blastradius] dependency-matched: 1, new-or-modified: 0, fallback: 0
Full prose reference, including the GitHub Actions feedback action: plugin README.