Gradle (Micronaut Committer)
Use this skill for Micronaut framework maintainer work. Do not default to end-user app guidance.
Goal
Apply correct, source-backed Gradle changes in Micronaut repositories, using the micronaut-build plugin contracts and current Gradle best practices.
Current coverage target: repositories on Gradle major line 9.x.
For dependency-intelligence tasks (version freshness, stability, release cadence, CVE/license checks), use the embedded maven-tools MCP via skill_mcp.
Procedure
- Identify build shape and active plugins.
- Map requested work to exact
micronaut-build plugin behavior.
- Execute minimal maintainer-safe change.
- Verify with targeted and aggregate Gradle tasks.
1) Establish build shape first
- Inspect
settings.gradle or settings.gradle.kts for settings plugins and dependency management.
- Confirm
io.micronaut.build.shared.settings is present unless the repository intentionally diverged.
- Validate settings-scoped plugins (especially Develocity wiring) in
settings.gradle(.kts), not in project build.gradle(.kts).
- Confirm root build applies
io.micronaut.build.internal.parent for standard aggregation behavior.
- Inspect root and impacted module build files for applied plugin IDs and
micronautBuild extension usage.
- Inspect
buildSrc/convention plugins before modifying module build scripts.
- Inspect
gradle.properties and gradle/*.versions.toml for version source and overrides.
- Treat module directory names and Gradle project paths separately; if standardized names are enabled, use
:micronaut-* paths for task targeting.
- If module paths are unclear, run
./gradlew projects.
- If dependency resolution is involved, capture
dependencyInsight before changing files.
2) Use source-of-truth plugin contracts
- Use
references/micronaut-build-plugins.md as the authoritative plugin behavior map.
- Treat
micronaut-build source as primary truth. Its README may be outdated.
- Remember default plugin IDs are internal:
io.micronaut.build.internal.<name>.
- Important exception:
io.micronaut.build.shared.settings.
3) Execute maintainer workflows
- Build failures: reproduce with minimal task path, then expand to module
check, then root validation.
- Catalog/version updates: use plugin-provided workflows (
updateVersionCatalogs, useLatestVersions) where available.
- Catalog imports: prefer
micronautBuild { importMicronautCatalog() } and alias-specific imports over ad hoc BOM wiring when repository conventions use settings extension catalog import.
- Dependency intelligence: use the
maven-tools MCP for latest stable versions, upgrade comparisons, and dependency health signals before changing catalogs or BOM constraints.
- Dependency scope hygiene: choose
api only for public API surface; use implementation for internals; use compileOnly/runtimeOnly intentionally.
- BOM/publishing: verify BOM generation, inlining behavior, publication metadata, and signing gates.
- Binary compatibility: keep baseline discovery and accepted API changes explicit; never silently suppress regressions.
- Docs/quality: treat root-only aggregator plugins and docs pipelines as first-class checks.
- Layering: prefer convention plugin changes (
buildSrc) over duplicating logic in many module build files.
4) Verify before completion
- Run at least one targeted task and one aggregate task:
./gradlew :<module>:check
./gradlew check
- For maintainer pipelines, include docs and style gates where applicable:
./gradlew check docs
./gradlew spotlessApply spotlessCheck
- For API-affecting changes, run compatibility checks:
- For newly added published modules, define when binary compatibility checks start in module build logic (example):
micronautBuild {
binaryCompatibility.enabledAfter("2.0.0")
}
- Use the repository's intended first compatible release version instead of blindly reusing
2.0.0.
- Add focused diagnostics when needed:
./gradlew dependencyInsight --configuration <conf> --dependency <module>
./gradlew --scan <task>
- Report exact commands and outcomes.
Guardrails
- Do not use
enforcedPlatform when plugin logic explicitly forbids it.
- Do not bypass Micronaut version mismatch checks except intentional development-version flows.
- Do not apply root-only plugins to subprojects.
- Do not replace framework maintainer workflows with generic app-centric shortcuts.
Best Practices
Use references/gradle-best-practices.md for operational standards on:
- configuration and build cache behavior,
- provider/lazy configuration patterns,
- toolchains and reproducibility,
- secure publishing and dependency verification,
- CI reliability.
Examples
- "Diagnose why micronaut-core version mismatch fails on compileClasspath."
- "Update version catalogs safely and apply latest allowed minor versions."
- "Fix Sonatype release pipeline behavior for a non-snapshot release."
- "Investigate binary compatibility failure and validate accepted changes file usage."
Validation Checklist
References
references/micronaut-build-plugins.md
references/gradle-best-practices.md
1---2name: gradle3description: Execute Gradle maintainer operations for Micronaut repositories using micronaut-build internals and modern Gradle best practices. Use when users ask to diagnose build failures, maintain BOM/version catalogs, manage publishing/signing, enforce binary compatibility, or debug micronaut-build plugin behavior.4license: Apache-2.05---67# Gradle (Micronaut Committer)89Use this skill for Micronaut framework maintainer work. Do not default to end-user app guidance.1011## Goal1213Apply correct, source-backed Gradle changes in Micronaut repositories, using the `micronaut-build` plugin contracts and current Gradle best practices.1415Current coverage target: repositories on Gradle major line `9.x`.1617For dependency-intelligence tasks (version freshness, stability, release cadence, CVE/license checks), use the embedded `maven-tools` MCP via `skill_mcp`.1819## Procedure20211. Identify build shape and active plugins.222. Map requested work to exact `micronaut-build` plugin behavior.233. Execute minimal maintainer-safe change.244. Verify with targeted and aggregate Gradle tasks.2526### 1) Establish build shape first2728- Inspect `settings.gradle` or `settings.gradle.kts` for settings plugins and dependency management.29- Confirm `io.micronaut.build.shared.settings` is present unless the repository intentionally diverged.30- Validate settings-scoped plugins (especially Develocity wiring) in `settings.gradle(.kts)`, not in project `build.gradle(.kts)`.31- Confirm root build applies `io.micronaut.build.internal.parent` for standard aggregation behavior.32- Inspect root and impacted module build files for applied plugin IDs and `micronautBuild` extension usage.33- Inspect `buildSrc`/convention plugins before modifying module build scripts.34- Inspect `gradle.properties` and `gradle/*.versions.toml` for version source and overrides.35- Treat module directory names and Gradle project paths separately; if standardized names are enabled, use `:micronaut-*` paths for task targeting.36- If module paths are unclear, run `./gradlew projects`.37- If dependency resolution is involved, capture `dependencyInsight` before changing files.3839### 2) Use source-of-truth plugin contracts4041- Use `references/micronaut-build-plugins.md` as the authoritative plugin behavior map.42- Treat `micronaut-build` source as primary truth. Its README may be outdated.43- Remember default plugin IDs are internal: `io.micronaut.build.internal.<name>`.44- Important exception: `io.micronaut.build.shared.settings`.4546### 3) Execute maintainer workflows4748- **Build failures**: reproduce with minimal task path, then expand to module `check`, then root validation.49- **Catalog/version updates**: use plugin-provided workflows (`updateVersionCatalogs`, `useLatestVersions`) where available.50- **Catalog imports**: prefer `micronautBuild { importMicronautCatalog() }` and alias-specific imports over ad hoc BOM wiring when repository conventions use settings extension catalog import.51- **Dependency intelligence**: use the `maven-tools` MCP for latest stable versions, upgrade comparisons, and dependency health signals before changing catalogs or BOM constraints.52- **Dependency scope hygiene**: choose `api` only for public API surface; use `implementation` for internals; use `compileOnly`/`runtimeOnly` intentionally.53- **BOM/publishing**: verify BOM generation, inlining behavior, publication metadata, and signing gates.54- **Binary compatibility**: keep baseline discovery and accepted API changes explicit; never silently suppress regressions.55- **Docs/quality**: treat root-only aggregator plugins and docs pipelines as first-class checks.56- **Layering**: prefer convention plugin changes (`buildSrc`) over duplicating logic in many module build files.5758### 4) Verify before completion5960- Run at least one targeted task and one aggregate task:61 - `./gradlew :<module>:check`62 - `./gradlew check`63- For maintainer pipelines, include docs and style gates where applicable:64 - `./gradlew check docs`65 - `./gradlew spotlessApply spotlessCheck`66- For API-affecting changes, run compatibility checks:67 - `./gradlew japiCmp`68- For newly added published modules, define when binary compatibility checks start in module build logic (example):6970```kotlin71micronautBuild {72 binaryCompatibility.enabledAfter("2.0.0")73}74```7576- Use the repository's intended first compatible release version instead of blindly reusing `2.0.0`.77- Add focused diagnostics when needed:78 - `./gradlew dependencyInsight --configuration <conf> --dependency <module>`79 - `./gradlew --scan <task>`80- Report exact commands and outcomes.8182## Guardrails8384- Do not use `enforcedPlatform` when plugin logic explicitly forbids it.85- Do not bypass Micronaut version mismatch checks except intentional development-version flows.86- Do not apply root-only plugins to subprojects.87- Do not replace framework maintainer workflows with generic app-centric shortcuts.8889## Best Practices9091Use `references/gradle-best-practices.md` for operational standards on:9293- configuration and build cache behavior,94- provider/lazy configuration patterns,95- toolchains and reproducibility,96- secure publishing and dependency verification,97- CI reliability.9899## Examples100101- "Diagnose why micronaut-core version mismatch fails on compileClasspath."102- "Update version catalogs safely and apply latest allowed minor versions."103- "Fix Sonatype release pipeline behavior for a non-snapshot release."104- "Investigate binary compatibility failure and validate accepted changes file usage."105106## Validation Checklist107108- [ ] Active plugins identified from build files.109- [ ] Decisions mapped to `micronaut-build` source behavior.110- [ ] Changes align with maintainer workflows.111- [ ] Verification tasks run and outcomes captured.112- [ ] No end-user-only Gradle guidance substituted for framework operations.113114## References115116- `references/micronaut-build-plugins.md`117- `references/gradle-best-practices.md`