src/main/skills/managing_gradle_dependencies/SKILL.md
Audits and manages Gradle dependency graphs with high-resolution update checks, transitive tree analysis, and Maven Central discovery; use for dependency auditing, finding stable updates, and resolving GAV coordinates. Do NOT use for exploring dependency source code (use `exploring_dependency_sources`) or running builds/tests (use `gradle`).
npx skillsauth add rnett/gradle-mcp managing_gradle_dependenciesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Audits project dependencies, performs high-resolution update checks, and discovers new libraries on Maven Central with powerful, integrated search tools.
inspect_dependencies for querying project dependency information instead of raw Gradle tasks.projectRoot.updatesOnly: true to quickly identify available library updates.lookup_maven_versions to find exact GAV coordinates for new libraries.projectPath argument to target specific modules in multi-project builds.:app) when querying dependencies.inspect_dependencies output under configurations prefixed with buildscript: (e.g. buildscript:classpath).updatesOnly: true in inspect_dependencies to retrieve a flat, high-signal report of available library updates: group:artifact: current → latest with the project paths where each dep is used.
Configuration and source-set detail is intentionally omitted; use inspect_dependencies with a specific dependency filter if that detail is needed.dependency parameter in inspect_dependencies to target a single library with a full-string Kotlin regex over group:name:version[:variant] coordinates.lookup_maven_versions to check the version history of an existing artifact.gradle for diagnostics: For built-in tasks like dependencyInsight, ALWAYS use the gradle tool with captureTaskOutput.onlyDirect: false in inspect_dependencies when you need to visualize the complete transitive dependency graph.:app).inspect_dependencies(projectPath=":app").configuration (e.g., runtimeClasspath) or sourceSet (e.g., test).inspect_dependencies(updatesOnly=true, stableOnly=true).group:artifact: current → latest and the project paths where it is used.lookup_maven_versions(coordinates="group:artifact") to see all available versions for a specific library.org.mongodb:mongodb-driver-sync).inspect_dependencies(dependency="^org\\.mongodb:mongodb-driver-sync(:.*)?$").lookup_maven_versions(coordinates="group:artifact") to find the artifact and its latest version.gradle/libs.versions.toml:
[versions]
my-lib = "X.Y.Z"
[libraries]
my-lib = { group = "com.example", name = "my-lib", version.ref = "my-lib" }
build.gradle.kts: Use the type-safe catalog accessor (e.g., implementation(libs.my.lib)) in the appropriate dependency configuration.inspect_dependencies(fresh: true) to confirm the dependency resolves correctly.// Step 1: Discover the library
{
"coordinates": "com.squareup.retrofit2:retrofit"
}
// Step 2: Update libs.versions.toml with the version and library entry
// Step 3: Add `implementation(libs.retrofit)` to the subproject's build.gradle.kts
// Step 4: Verify
{
"projectPath": ":app",
"dependency": "^com\\.squareup\\.retrofit2:retrofit(:.*)?$"
}
// Reasoning: Adding the Retrofit library to the 'app' module with full resolution verification.
Build script dependencies (plugins) are automatically reported under buildscript: configurations. To specifically verify plugin resolution:
inspect_dependencies(sourceSetPath=":buildscript") for the root project, or sourceSetPath=":app:buildscript" for a subproject.buildscript:classpath configuration for plugin dependencies.fresh: true if plugins were recently added or updated.{
"sourceSetPath": ":buildscript",
"dependency": "^org\\.jetbrains\\.kotlin:kotlin-gradle-plugin(:.*)?$"
}
// Reasoning: Verifying the Kotlin plugin is properly resolved in the buildscript classpath.
{
"projectPath": ":app"
}
// Reasoning: Auditing the direct and transitive dependencies of the 'app' module to understand its runtime footprint.
{
"dependency": "^org\\.jetbrains\\.kotlinx:kotlinx-coroutines-core(:.*)?$",
"updatesOnly": true
}
// Reasoning: Surgically checking if a specific library has available updates.
{
"updatesOnly": true,
"stableOnly": true
}
// Reasoning: Performing a high-signal update audit that ignores unstable pre-release versions.
{
"coordinates": "org.jetbrains.kotlinx:kotlinx-serialization-json"
}
// Reasoning: Retrieving the full version history of an artifact to identify the latest stable or specific version required.
projectPath using the projects task in the gradle skill.stableOnly is set correctly and check if a versionFilter is active.onlyDirect=true, or deps excluded by a dependency filter).group:artifact format for version searches.invocationArguments: { envSource: "SHELL" } if Gradle cannot find expected env vars (e.g., JAVA_HOME).tools
Provides authoritative guidance for ALL Gradle operations: executing builds, running tests with surgical filtering, introspecting project structure, creating modules, and diagnosing failures; ALWAYS use instead of raw shell `./gradlew` for build execution, test runs, task introspection, module creation, performance audits, and documentation research. Do NOT use for dependency graph auditing/updates (use `managing_gradle_dependencies`) or dependency/plugin/Gradle source exploration (use `exploring_dependency_sources`).
tools
Reads and searches source code across ALL scopes: external library dependencies, plugins (buildscript), and Gradle Build Tool internal source code; use whenever you need to UNDERSTAND an API — its shape, signature, parameters, overloads, or implementation — before writing any code that calls it; covers project dependencies (via project/configuration/source set scope), plugins (via `sourceSetPath=":buildscript"`), and Gradle internals (via `gradleSource: true`). Prefer this over the REPL for all API research; reading source is instantaneous and complete. Do NOT use for project source code (use grep/tilth), Gradle documentation (use `gradle_docs` via the `gradle` skill), or Maven Central discovery (use `managing_gradle_dependencies`).
development
Executes Kotlin code interactively within the project's full JVM classpath. Use when you need to RUN code: verify runtime behavior, experiment with logic, or render Compose UI previews. Do NOT use to understand an API's shape or signature — read its source with `exploring_dependency_sources` instead.
tools
Reads and searches source code of external library dependencies, plugins, and Gradle Build Tool source code. Use this whenever you need to UNDERSTAND an API: its shape, signature, parameters, overloads, or implementation — before writing any code that calls it. Prefer this over the REPL for all API research; reading source is instantaneous and complete. Do NOT use for project source code (use grep/tilth), Gradle documentation (use `researching_gradle_internals`), or Maven Central discovery (use `managing_gradle_dependencies`).