run_task
Execute Gradle build tasks like compiling code, running tests, or packaging applications. Specify task names and optional arguments to control the build process.
Instructions
Run a Gradle task.
This tool cannot run cleaning tasks (clean, cleanBuild, etc.).
Use the clean
tool for cleaning tasks instead.
Args: task: Task name to run. Can be simple (e.g., 'build', 'test') for root project or qualified with project path (e.g., ':app:build', ':core:test'). args: Additional arguments to pass to Gradle (e.g., ['-x', 'test']).
Returns: TaskResult with success status and error message if failed.
Raises: ValueError: If the task is a cleaning task.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
args | No | ||
task | Yes |