run_gradle_build
Run whitelisted Gradle tasks asynchronously to verify code changes compile before continuing, returning a job ID for status polling.
Instructions
Run a Gradle task with async tracking support.
When to use:
- Call to verify that surgical edits or token refactorings compile without errors.
- Call after batch changes before approving or completing a task.
When NOT to use:
- Do not use for arbitrary shell execution; tasks are strictly whitelist-restricted.
- Do not use for simple file reading or AST validation (use check_syntax_cli or ast_finder instead).
Side effects:
- Executes a Gradle build process in background; may write build artifacts to build/ directories.
This lets the agent verify that code changes compile successfully
before continuing with more changes, without locking the MCP connection.
Args:
task: gradle task to run (whitelist enforced: assembleDebug, assembleRelease, test, lint, clean, etc.).
timeout_seconds: max execution time (default 5 min).
async_mode: if true (default), returns job_id immediately so agent can poll with get_gradle_status.
Returns:
JSON with job_id and status, or execution result if sync.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | No | assembleDebug | |
| async_mode | No | ||
| timeout_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |