running_gradle_builds
Skill1.1k starsChanged 5 days agoApache-2.0View on GitHub
Executes and orchestrates Gradle builds with background management, surgical task output capturing, and structured failure diagnostics; ALWAYS use instead of `./gradlew` for core lifecycle tasks (build, assemble), dev servers, and troubleshooting. Do NOT use for running tests (use `running_gradle_tests`) or dependency graph auditing.
We split this skill into the rules it gives an agent
28 rules. About 0 are common, 4 are distinctive, and 24 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
24
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
ALWAYS: use the gradle tool instead of ./gradlew via shell.
- Very specific: line 21
NEVER: use --rerun-tasks unless investigating project-wide cache-specific corruption.
- Distinctive: line 22
ALWAYS: prefer foreground execution (default) unless the task is persistent (e.g., servers) or extremely long-running (>2 minutes).
- Very specific: line 23
ALWAYS: use captureTaskOutput when you need the isolated output of a specific task (e.g., help, dependencies).
- Very specific: line 24
ALWAYS: check the build dashboard (inspect_build()) to manage active processes and historical results.
- Very specific: line 25
STRONGLY PREFERRED: Use inspect_build for all diagnostics.
- Very specific: line 26
NEVER: leave background builds running.
- Very specific: line 34
Call inspect_build() without arguments to see the Build Dashboard.
- Very specific: line 58
Use timeout, waitFor, or waitForTask to block until a condition is met in a background build.
- Very specific: line 61
Wait for completion: If timeout is set without a wait condition (waitFor/waitForTask), the tool waits for the build to finish.
- Very specific: line 67
Example: Call inspect_build(buildId="ID", mode="summary") repeatedly to see updated test counts: (5 passed, 1 failed).
- Distinctive: line 71
ALWAYS use foreground for authoritative builds: If you intend to wait for a result, ALWAYS use foreground execution.
- Very specific: line 73
Background ONLY for persistent tasks: Use background: true ONLY for tasks that must remain active (e.g., bootRun, continuous builds) or …
- Very specific: line 74
Monitor with
inspect_build: Use inspect_build to check the status of background builds or to perform deep-dives into any historical build … - Distinctive: line 92
Root Project Only: Use a single leading colon.
- Distinctive: line 94
Subproject Only: Use the subproject name(s) separated by colons.
- Very specific: line 99
Core Lifecycle Execution: When you need to execute standard Gradle tasks like build, assemble, or clean with maximum reliability and clean, …
- Very specific: line 100
Persistent Development Processes: When starting development servers (e.g., bootRun) or continuous builds where background management and …
- Very specific: line 101
Surgical Build Troubleshooting: When a build has failed and you need to perform deep-dive analysis of task failures or console logs using …
- Very specific: line 103
Task-Specific Information Retrieval: When you need to extract isolated output from a single task (like help or properties) without the …
- Very specific: line 110
Call gradle with the commandLine.
- Very specific: line 111
If the build fails, the tool will return a high-signal failure summary.
- Very specific: line 115
Start the build with background: true to receive a BuildId.
- Very specific: line 116
Use inspect_build(buildId=ID, timeout=..., waitFor=...) to block until a specific state or log pattern is reached.
- Very specific: line 117
Call inspect_build() (no arguments) to manage active jobs in the dashboard.
- Very specific: line 118
Stop the job using gradle(stopBuildId=ID) once its utility is complete.
- Very specific: line 171
Build Not Found: If a BuildId is not recognized, it may have expired from the recent history cache.
- Very specific: line 172
Task Output Not Captured: Ensure the path provided to captureTaskOutput matches exactly one of the tasks in the commandLine.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Authoritative Gradle Build Execution & Orchestration
Executes Gradle builds with managed background orchestration and surgical failure diagnostics.
Constitution
- ALWAYS use the
gradletool instead of./gradlewvia shell. - ALWAYS provide absolute paths for
projectRoot. - NEVER use
--rerun-tasksunless investigating project-wide cache-specific corruption; prioritize Gradle's native caching. Prefer--rerunfor individual tasks to ensure they are executed even if up-to-date. - ALWAYS prefer foreground execution (default) unless the task is persistent (e.g., servers) or extremely long-running (>2 minutes).
- ALWAYS use
captureTaskOutputwhen you need the isolated output of a specific task (e.g.,help,dependencies). - ALWAYS check the build dashboard (
inspect_build()) to manage active processes and historical results. - STRONGLY PREFERRED: Use
inspect_buildfor all diagnostics. It is more token-efficient than reading raw console logs and provides structured access to failures. - NEVER leave background builds running; use
stopBuildIdto release resources when finished.
Surgical Inspection with inspect_build
The inspect_build tool is your primary window into build results. Use it to move from high-level summaries to deep-dive diagnostics.
1. Build Dashboard (No Arguments)
Call inspect_build() without arguments to see the Build Dashboard. This shows active background builds and recently completed builds with their BuildId, status, and failure counts.
- Example:
inspect_build()
2. Build Summary
Provide a buildId to get a summary of that specific build, including failures, problems, and test results. This summary also contains a guide on how to inspect specific details.
- Example:
inspect_build(buildId="ID")
3. Detailed Inspection (mode="details")
To get exhaustive information, ALWAYS use mode="details" combined with a specific target:
- Individual Tests:
testName="FullTestName",mode="details"(REQUIRED for full output/stack trace).- Prefix Support: Both
testNameandtaskPathsupport unique prefix matching. Providing a unique prefix (e.g.,testName="com.example.MyTest"ortaskPath=":app:compile") will automatically select the item if it's unambiguous.
- Prefix Support: Both
- Task Outputs:
taskPath=":path:to:task",mode="details". - Build Failures:
failureId="ID",mode="details"(find IDs in the build summary). - Problems/Errors:
problemId="ID",mode="details"(find IDs in the build summary). - Console Logs:
consoleTail=true(last N lines) orconsoleTail=false(first N lines).
4. Progress Monitoring
Use timeout, waitFor, or waitForTask to block until a condition is met in a background build.
- Example:
inspect_build(buildId="ID", timeout=60, waitFor="Started Application") - Wait for completion: If
timeoutis set without a wait condition (waitFor/waitForTask), the tool waits for the build to finish.
5. Monitoring Test Progress
While a build is running, the progress notification (and the inspect_build summary) provides real-time counts of passed, failed, and skipped tests. This gives immediate feedback on the health of the test suite.
- Example: Call
inspect_build(buildId="ID", mode="summary")repeatedly to see updated test counts:(5 passed, 1 failed).
Directives
- ALWAYS use foreground for authoritative builds: If you intend to wait for a result, ALWAYS use foreground execution. It provides superior progressive disclosure and simpler control flow than starting a background build only to
immediately call
inspect_build(timeout=...). - Background ONLY for persistent tasks: Use
background: trueONLY for tasks that must remain active (e.g.,bootRun,continuousbuilds) or when you explicitly intend to perform independent research while the build proceeds. - Monitor with
inspect_build: Useinspect_buildto check the status of background builds or to perform deep-dives into any historical build started by the server. - Provide absolute
projectRoot: ProvideprojectRootas an absolute file system path to all Gradle MCP tools. Relative paths are not supported. - Manage resources via dashboard: Frequently call
inspect_buildwithout arguments to view the build dashboard and ensure no orphaned background builds are consuming system resources.
Authoritative Task Path Syntax
Gradle utilizes two primary ways to identify tasks from the command line. Precision here prevents running redundant tasks in multi-project builds.
1. Task Selectors (Recursive Execution)
Providing a task name without a leading colon (e.g., test, build) acts as a selector. Gradle will execute that task in every project (root and all subprojects) that contains a task with that name.
- Example:
gradle(commandLine=["test"])-> Executestestin all projects.
2. Absolute Task Paths (Targeted Execution)
Providing a task path with a leading colon (e.g., :test, :app:test) targets a single specific project.
- Root Project Only: Use a single leading colon.
- Example:
gradle(commandLine=[":test"])-> Executestestin the root project ONLY.
- Example:
- Subproject Only: Use the subproject name(s) separated by colons.
- Example:
gradle(commandLine=[":app:test"])-> Executestestin the 'app' subproject ONLY.
- Example:
When to Use
- Core Lifecycle Execution: When you need to execute standard Gradle tasks like
build,assemble, orcleanwith maximum reliability and clean, parseable output. - Persistent Development Processes: When starting development servers (e.g.,
bootRun) or continuous builds where background management and real-time log monitoring are required. - Surgical Build Troubleshooting: When a build has failed and you need to perform deep-dive analysis of task failures or console logs using the
inspect_builddiagnostic suite. For test failures, ALWAYS usetestNamewithmode="details". - Task-Specific Information Retrieval: When you need to extract isolated output from a single task (like
helporproperties) without the noise of the full build log.
Workflows
Running a Foreground Build
- Identify the task(s) to run (e.g.,
["clean", "build"]). - Call
gradlewith thecommandLine. - If the build fails, the tool will return a high-signal failure summary. Use
inspect_buildwith thebuildIdfor deeper diagnostics.
Orchestrating Background Jobs
- Start the build with
background: trueto receive aBuildId. - Use
inspect_build(buildId=ID, timeout=..., waitFor=...)to block until a specific state or log pattern is reached. - Call
inspect_build()(no arguments) to manage active jobs in the dashboard. - Stop the job using
gradle(stopBuildId=ID)once its utility is complete.
Examples
Run build in all projects
{
"commandLine": ["build"]
}
// Reasoning: Using a task selector to verify build health across the entire multi-project structure.Run test only in a specific subproject
{
"commandLine": [":app:test"]
}
// Reasoning: Using an absolute path to target a specific module, minimizing execution time and context usage.Inspect Help Output for a Specific Task
{
"commandLine": [":app:help", "--task", "test"],
"captureTaskOutput": ":app:help"
}
// Reasoning: Using captureTaskOutput to retrieve clean, isolated documentation for the 'test' task without Gradle's general console noise.Start a Dev Server and Wait for Readiness
// 1. Start the server in the background
{
"commandLine": [":app:bootRun"],
"background": true
}
// Response: { "buildId": "build_123" }
// 2. Wait for the 'Started Application' log pattern
{
"buildId": "build_123",
"timeout": 60,
"waitFor": "Started Application"
}
// Reasoning: Using background orchestration to allow the server to remain active while waiting for a specific readiness signal.Troubleshooting
- Build Not Found: If a
BuildIdis not recognized, it may have expired from the recent history cache. Check the dashboard (inspect_build()) for valid active and historical IDs. - Task Output Not Captured: Ensure the path provided to
captureTaskOutputmatches exactly one of the tasks in thecommandLine. - Missing environment variables: Set
invocationArguments: { envSource: "SHELL" }if Gradle cannot find expected env vars (e.g.,JAVA_HOME).
Resources
- Background Monitoring
- Failure Analysis
Trending
Quiet since September.about the whole repository
Who's talking about Kotlin/kotlinx-rpc
- bright-room/mindstock“fix(deps): update kotlinx.rpc to v0.10.4”GitHub · Sep 25, 2026
- bright-room/mindstock“fix(deps): update kotlinx.rpc to v0.10.3”GitHub · Jul 10, 2026
- modelix/modelix.editor“fix(deps): update kotlinx.rpc to v0.10.4”GitHub · Jul 6, 2026
- ktorio/ktor-plugin-registry“Bump the all-gradle group with 11 updates”GitHub · Jun 30, 2026
- DerTyp7214/synara-api“chore(deps): bump kotlinx-rpc from 0.10.2 to 0.10.3”GitHub · Jun 27, 2026
The biggest 5 of 16 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 16
Talked about on GitHub (16 times).
On GitHub · 16
- Sep 25, 2026fix(deps): update kotlinx.rpc to v0.10.4 — bright-room/mindstock0 reactions · 1 comment
- Jul 10, 2026fix(deps): update kotlinx.rpc to v0.10.3 — bright-room/mindstock0 reactions
- Jul 6, 2026fix(deps): update kotlinx.rpc to v0.10.4 — modelix/modelix.editor0 reactions · 1 comment
- Jun 30, 2026Bump the all-gradle group with 11 updates — ktorio/ktor-plugin-registry0 reactions
- Jun 27, 2026chore(deps): bump kotlinx-rpc from 0.10.2 to 0.10.3 — DerTyp7214/synara-api0 reactions · 1 comment
11 more on GitHub
- May 3, 2026Add compiler plugin implementation and Kotlin External FIR Support — TBSten/cream0 reactions
- Mar 30, 2026build(deps): bump kotlinx-rpc from 0.10.1 to 0.10.2 — modelix/modelix.editor0 reactions · 5 comments
- Jan 17, 2026chore(deps): bump kotlinx-rpc from 0.10.1 to 0.10.2 — DerTyp7214/synara-api0 reactions · 2 comments
- Dec 20, 2025build(deps): bump org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-client from 0.10.0 to 0.10.1 — DerTyp7214/synara-api0 reactions · 1 comment
- Dec 20, 2025build(deps): bump org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-server from 0.10.0 to 0.10.1 — DerTyp7214/synara-api0 reactions · 1 comment
- Jul 3, 2025Update kxrpc tutorial to 0.8.0 — ktorio/ktor-documentation0 reactions · 2 comments
- Jul 3, 2025Update kxrpc to 0.8.0 — ktorio/ktor-plugin-registry0 reactions · 1 comment
- Apr 4, 2025Update kxrpc to 0.6.0 — ktorio/ktor-plugin-registry0 reactions · 1 comment
- Jan 28, 2025Update kxrpc to 0.5.0 — ktorio/ktor-plugin-registry0 reactions
- Jan 7, 2025Migrate cloud-run server to RPC ProtoBuf — ashdavies/playground.ashdavies.dev0 reactions
- May 26, 2024KotlinでRemote Procedure Calls (RPC) を簡単に行えるライブラリkotlinx.rpc — AndroidDagashi/AndroidDagashi0 reactions
In this repository19 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- commit-changesSkill
- file-youtrack-issueSkill
- fix-issueSkill
- gh-stackSkill
- gradle_expertSkill
- interacting_with_project_runtimeSkill
- introspecting_gradle_projectsSkill
- managing_gradle_dependenciesSkill
- researching_gradle_internalsSkill
- run-local-verificationsSkill
- running_gradle_testsSkill
- searching_dependency_sourcesSkill
- update-docSkill
- update-shimSkill
- use-develocitySkill
- use-teamcitySkill
- use-youtrackSkill
- verify-compiler-plugin-compatibilitySkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

