Gradle-mcp researching_gradle_internals
install
source · Clone the upstream repo
git clone https://github.com/rnett/gradle-mcp
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/rnett/gradle-mcp "$T" && mkdir -p ~/.claude/skills && cp -r "$T/src/main/skills/researching_gradle_internals" ~/.claude/skills/rnett-gradle-mcp-researching-gradle-internals && rm -rf "$T"
manifest:
src/main/skills/researching_gradle_internals/SKILL.mdsource content
Authoritative Gradle Documentation & Source Research
Researches official documentation and probes Gradle's internal source code with absolute precision to understand the build tool's behavior and protocols.
Constitution
- ALWAYS use the
tool as the primary source for documentation queries.gradle_docs - ALWAYS use
withsearch_dependency_sources
when probing Gradle's internal logic.gradleSource: true - ALWAYS provide absolute paths for
.projectRoot - ALWAYS scope documentation searches using the
syntax (e.g.,tag:<section>
,tag:dsl
).tag:userguide - NEVER assume behavior without verifying it against the documentation OR the actual source implementation.
- ALWAYS check for breaking changes in the
tag when investigating version-specific regressions.release-notes
Directives
- Identify the research target: ALWAYS determine if you need authoritative guidance (Documentation) or the ground-truth implementation (Source).
- Scope documentation surgically: ALWAYS use tags like
,userguide
, anddsl
in yourrelease-notes
query to minimize irrelevant results.gradle_docs - Probe Gradle sources authoritatively: ALWAYS use
ingradleSource: true
to target Gradle's internal engine.search_dependency_sources - Read implementation details: ALWAYS use
withread_dependency_sources
to examine the actual code of any Gradle interface or class once identified.gradleSource: true - Escape Lucene special characters: When searching documentation via
or source code viagradle_docs
(withsearch_dependency_sources
), ALWAYS escape special characters likesearchType: "FULL_TEXT"
,:
,=
,+
,-
,*
with a backslash (e.g.,/
) or enclose them in double quotes (e.g.,\:
) for literal searches to avoid Lucene syntax errors."val x = 10" - Identify Search Mode for Internals:
- Use
to find the exact declaration of a Gradle interface or class. All declaration searches are case-sensitive. Do NOT include keywords likeDECLARATION
orclass
(e.g., useinterface
, notProject
).interface Project - You can search by simple name (e.g.,
), full name (e.g.,Project
), or partial package paths (e.g.,org.gradle.api.Project
).api.Project - Supports glob wildcards for FQNs:
matches one segment,*
matches multiple (e.g.,**
,fqn:org.gradle.*.Project
).fqn:org.**.Project - Supports full Lucene query syntax (e.g.,
).name:Project AND fqn:org.gradle.api.* - Use
to find internal usage patterns, constants, or behavior described in the source.FULL_TEXT
searches are case-insensitive.FULL_TEXT - Use
to locate Gradle's internal resource files or build scripts.GLOB
searches are case-insensitive.GLOB
- Use
- Verify against the local version: The tools automatically target the Gradle version used by the current project. ALWAYS use the
argument forversion
when researching other releases.gradle_docs
Available Documentation Tags
| Tag | Section |
|---|---|
| The official Gradle User Guide. |
| The Gradle DSL Reference (Groovy and Kotlin DSL). |
| The Gradle Java API Reference. |
| Official Gradle samples and examples. |
| Version-specific release insights. |
| Official Gradle best practices and performance guidelines. |
When to Use
- DSL & Plugin Verification: When you need to understand the precise syntax for DSL elements (e.g.,
,publishing
) or official plugin configurations. Usesigning
.tag:dsl - Feature Implementation Analysis: When researching advanced topics like custom task authoring or plugin development. Use
for guidance andtag:userguide
for implementations.gradleSource: true - Version Compatibility Auditing: When checking for new features, deprecations, or breaking changes in a specific Gradle release. Use
.tag:release-notes - Internal Engine Exploration: When performing deep-dives into Gradle's behavior (e.g., dependency resolution logic, task execution engine) using
.gradleSource: true
Workflows
1. Researching a Core Feature
- Search the
viauserguide
.gradle_docs(query="tag:userguide <term>") - Review the markdown results and read specific pages using the
.path - If the behavior is undocumented, search for the corresponding classes in the Gradle source via
.search_dependency_sources(query="class <Name>", gradleSource=true)
2. Probing Plugin APIs
- Use
to find the documentation for the plugin's configuration block.tag:dsl - Search for the plugin's implementation classes in
to understand how it handles the configuration at runtime.gradleSource
3. Reading Implementation Logic
- Identify the path of a Gradle internal class from
.search_dependency_sources - Call
to retrieve the implementation.read_dependency_sources(path="org/gradle/...", gradleSource=true)
Examples
Search for Kotlin DSL documentation
{ "query": "tag:dsl kotlin dsl" } // Reasoning: Scoping the search to the DSL Reference to find authoritative syntax for Kotlin scripts.
Probe Gradle's Project interface implementation
{ "query": "Project", "searchType": "DECLARATION", "gradleSource": true } // Reasoning: Using gradleSource and DECLARATION search to find the ground-truth implementation of the core Project API.
Search for a symbol with glob wildcards
{ "query": "fqn:org.gradle.*.Project", "searchType": "DECLARATION", "gradleSource": true } // Reasoning: Using a glob wildcard to find Project declarations in any direct sub-package of org.gradle.
Search release notes for a specific version
{ "query": "tag:release-notes", "version": "8.6" } // Reasoning: Directly targeting the release notes of a specific version to audit breaking changes.
Read a specific Gradle internal class
{ "path": "org/gradle/api/Project.java", "gradleSource": true } // Reasoning: Retrieving the source code for a fundamental Gradle class for high-resolution analysis.
Troubleshooting
- Source Not Found: Some Gradle internal modules may not be fully indexed. Try a broader full-text search or browse the directory structure.
- Documentation Mismatch: Ensure you are targeting the correct version. Use the
argument if the project's detected version is not the one you intended to research.version