Skip to content

Commit a7c1e22

Browse files
authored
Merge pull request #4 from badsyntax/vscode-tasks
Use VS Code tasks
2 parents 902ce08 + 4bbd9c9 commit a7c1e22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+818
-934
lines changed

.github/workflows/nodejs-test.yml

+20-20
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,25 @@ jobs:
5151
npm test
5252
shell: pwsh
5353

54-
build-test-macos:
55-
runs-on: macOS-10.14
54+
# build-test-macos:
55+
# runs-on: macOS-10.14
5656

57-
strategy:
58-
matrix:
59-
node-version: [12.x]
57+
# strategy:
58+
# matrix:
59+
# node-version: [12.x]
6060

61-
steps:
62-
- uses: actions/checkout@v1
63-
- name: Use Node.js ${{ matrix.node-version }}
64-
uses: actions/setup-node@v1
65-
with:
66-
node-version: ${{ matrix.node-version }}
67-
- uses: actions/setup-java@v1
68-
with:
69-
java-version: '12.0.2'
70-
architecture: x64
71-
- name: Build & test extension
72-
run: |
73-
npm ci
74-
npm run lint
75-
npm test
61+
# steps:
62+
# - uses: actions/checkout@v1
63+
# - name: Use Node.js ${{ matrix.node-version }}
64+
# uses: actions/setup-node@v1
65+
# with:
66+
# node-version: ${{ matrix.node-version }}
67+
# - uses: actions/setup-java@v1
68+
# with:
69+
# java-version: '12.0.2'
70+
# architecture: x64
71+
# - name: Build & test extension
72+
# run: |
73+
# npm ci
74+
# npm run lint
75+
# npm test

.vscode/tasks.json

+13
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@
1515
"kind": "build",
1616
"isDefault": true
1717
}
18+
},
19+
{
20+
"type": "npm",
21+
"script": "compile",
22+
"group": "build",
23+
"problemMatcher": []
24+
},
25+
{
26+
"type": "npm",
27+
"script": "lint",
28+
"problemMatcher": [
29+
"$eslint-stylish"
30+
]
1831
}
1932
]
2033
}

README.md

+8-54
Original file line numberDiff line numberDiff line change
@@ -10,52 +10,20 @@ Run gradle tasks in VS Code.
1010

1111
## Features
1212

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
13+
- Run gradle tasks as [VS Code tasks](https://code.visualstudio.com/docs/editor/tasks)
14+
- Run gradle tasks in the Explorer
15+
- Multi-root workspaces supported
2016

2117
## Setup
2218

23-
The extension requires a local gradle wrapper executable at the root of the workspace.
19+
A local gradle wrapper executable must exist at the root of the workspace folders.
2420

25-
You can configure this with the `gradle.useCommand` setting:
26-
27-
### Linux/MacOS (default):
28-
29-
```json
30-
{
31-
"gradle.useCommand": "./gradlew"
32-
}
33-
```
34-
35-
### Windows:
21+
### Settings
3622

3723
```json
38-
{
39-
"gradle.useCommand": ".\\gradlew.bat"
40-
}
41-
```
42-
43-
## Usage
44-
45-
Run any of the following commands:
46-
47-
- `Gradle: Run task`
48-
- `Gradle: Refresh tasks`
49-
- `Gradle: Kill all tasks`
50-
51-
Or run gradle tasks from the explorer.
52-
53-
## Settings
54-
55-
```json
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
24+
"gradle.autoDetect": true, // Automatically detect gradle tasks
25+
"gradle.tasksArgs": "--all", // Custom gradle tasks arguments
26+
"gradle.enableTasksExplorer": true // Enable an explorer view for gradle tasks
5927
```
6028

6129
## Limitations
@@ -70,24 +38,10 @@ Eventually the command should fail with an error message. This is usually due to
7038

7139
</details>
7240

73-
<details><summary>The extension show an error "Unable to refresh gradle tasks: Command failed..."</summary>
74-
75-
The path to the gradle wrapper does not exist. Change the `"gradle.useCommand"` setting to point to a local `gradlew` executable.
76-
77-
</details>
78-
7941
## Credits
8042

8143
This project is a fork of [Cazzar/vscode-gradle](https://github.com/Cazzar/vscode-gradle), which is no longer maintained.
8244

83-
## Bugs
84-
85-
Please [file an issue](https://github.com/badsyntax/vscode-gradle/issues/new) if the extension does not work for you.
86-
87-
## TODO
88-
89-
See [TODO.md](./TODO.md).
90-
9145
## License
9246

9347
See [LICENSE.md](./LICENSE.md).

TODO.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
- [x] Windows support
44
- [ ] Tests
5-
- [ ] `'workspace.rootPath' is deprecated and should no longer be used. Please use 'workspace.workspaceFolders' instead. More details: https://aka.ms/vscode-eliminating-rootpath`
5+
- [x] `'workspace.rootPath' is deprecated and should no longer be used. Please use 'workspace.workspaceFolders' instead. More details: https://aka.ms/vscode-eliminating-rootpath`
66
- [x] Run tasks from collapsible sidebar panel
77
- [ ] Only refresh on activation if activation is not refresh
88
- [x] Run gradle task before check if there are available tasks
99
- [ ] Show "folder" view in explorer - organise tasks by category, eg "Build Setup tasks", "Distribution tasks" etc
1010
- [ ] Check standards on global gradlew
1111
- [ ] Add task args
12-
- [ ] Auto discover gradle or gradle wrapper across environments
12+
- [x] Auto discover gradle or gradle wrapper across environments

foo.js

-3
This file was deleted.

images/task-list.png

-225 KB
Loading

package-lock.json

+2-46
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)