44
55<!--  -->
66
7- This extension provides support to run gradle tasks .
7+ Run gradle tasks in VS Code .
88
99![ Main image] ( images/task-list.png )
1010
11- ## Usage
12-
13- Run any of the following commands:
14-
15- - ` Gradle: Run task `
16- - ` Gradle: Refresh tasks `
17- - ` Gradle: Kill all tasks `
11+ ## Features
1812
19- Or run gradle tasks from the explorer.
13+ - List gradle tasks in the Command Palette
14+ - List gradle tasks in the Explorer
15+ - Read project or all tasks (via custom gradle tasks arguments)
16+ - Run gradle tasks (via Command Palette or Explorer) and view output
17+ - Load tasks when ` build.gradle ` file is found in root workspace
18+ - Refresh tasks when ` build.gradle ` changes
19+ - Kill gradle task processes
2020
21- ## Settings
21+ ## Setup
2222
23- Use global ` gradlew ` :
23+ The extension requires a local gradle wrapper executable at the root of the workspace.
2424
25- ``` json
26- "gradle.useCommand" : " gradlew"
27- ```
25+ You can configure this with the ` gradle.useCommand ` setting:
2826
29- Use local ` gradlew ` (default):
27+ ### Linux/MacOS (default):
3028
3129``` json
32- "gradle.useCommand" : " ./gradlew"
30+ {
31+ "gradle.useCommand" : " ./gradlew"
32+ }
3333```
3434
35- Use project tasks :
35+ ### Windows :
3636
3737``` json
38- "gradle.tasks.args" : " "
38+ {
39+ "gradle.useCommand" : " .\\ gradlew.bat"
40+ }
3941```
4042
41- Use all tasks (default):
43+ ## Usage
4244
43- ``` json
44- "gradle.tasks.args" : " --all"
45- ```
45+ Run any of the following commands:
4646
47- Disable tasks explorer:
47+ - ` Gradle: Run task `
48+ - ` Gradle: Refresh tasks `
49+ - ` Gradle: Kill all tasks `
4850
49- ``` json
50- "gradle.enableTasksExplorer" : false
51- ```
51+ Or run gradle tasks from the explorer.
5252
53- Enable tasks explorer (default):
53+ ## Settings
5454
5555``` json
56- "gradle.enableTasksExplorer" : true
56+ "gradle.useCommand" : " ./gradlew" , // path to local gradle wrapper
57+ "gradle.tasks.args" : " --all" , // gradle tasks args
58+ "gradle.enableTasksExplorer" : true // show gradle tasks in the explorer
5759```
5860
59- ## Features
60-
61- - List gradle tasks in the Command Palette
62- - List gradle tasks in the Explorer
63- - Read project or all tasks (via custom gradle tasks arguments)
64- - Run gradle tasks (via Command Palette or Explorer) and view output
65- - Load tasks when ` build.gradle ` file is found in root workspace
66- - Refresh tasks when ` build.gradle ` changes
67- - Kill gradle task processes
68-
6961## Troubleshooting
7062
7163<details ><summary >The extension hangs with "Refreshing gradle tasks"...</summary >
@@ -74,13 +66,9 @@ Eventually the command should fail with an error message. This is usually due to
7466
7567</details >
7668
77- <details ><summary >The extension show an error "Unable to refresh gradle tasks: Command failed: Error: spawn gradlew..."</summary >
78-
79- This means the global ` gradlew ` command is not available. Change the command setting to point to a local ` gradlew ` command:
69+ <details ><summary >The extension show an error "Unable to refresh gradle tasks: Command failed..."</summary >
8070
81- ``` json
82- "gradle.useCommand" : " ./gradlew"
83- ```
71+ The path to the gradle wrapper does not exist. Change the ` "gradle.useCommand" ` setting to point to a local ` gradlew ` executable.
8472
8573</details >
8674
0 commit comments