Skip to content

Commit 6122154

Browse files
committed
Update README & node version
1 parent 7d36b09 commit 6122154

File tree

18 files changed

+406
-67
lines changed

18 files changed

+406
-67
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lts/dubnium
1+
lts/erbium

README.md

Lines changed: 32 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,68 +4,60 @@
44

55
<!-- ![Build status](https://github.com/badsyntax/vscode-gradle/workflows/Node%20CI/badge.svg) -->
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

TODO.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
- [ ] Only refresh on activation if activation is not refresh
88
- [x] Run gradle task before check if there are available tasks
99
- [ ] Check standards on global gradlew
10+
- [ ] Add task args

foo.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"gradle.useCommand": ".\\gradlew.bat"
3+
}

package-lock.json

Lines changed: 18 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Gradle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function runTask(
3636
const cmd = getCommand();
3737
const args = [task.label];
3838
const options = { cwd: workspace.rootPath };
39-
const feedback = `Running ${cmd}`;
39+
const feedback = `Running ${cmd} ${task.label}`;
4040
const statusbar: Disposable = window.setStatusBarMessage(feedback);
4141

4242
outputChannel.show();

src/Process.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export default class Process {
1414
readonly processLogger?: ProcessLogger
1515
) {
1616
this.deferred = new Deferred();
17-
1817
this.childProcess = spawn(command, args, options);
1918

2019
let stdoutData = '';
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-12/"/>
4+
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
5+
<classpathentry kind="output" path="bin/default"/>
6+
</classpath>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Ignore Gradle project-specific cache directory
2+
.gradle
3+
4+
# Ignore Gradle build output directory
5+
build
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>gradle</name>
4+
<comment>Project gradle created by Buildship.</comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
22+
</natures>
23+
</projectDescription>

0 commit comments

Comments
 (0)