Skip to content

Commit d061646

Browse files
authored
Merge pull request #56 from badsyntax/nested-tasks
Use gradle api to list tasks
2 parents d61ff20 + 753a19b commit d061646

File tree

48 files changed

+1071
-684
lines changed

Some content is hidden

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

48 files changed

+1071
-684
lines changed

.github/workflows/nodejs.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,13 @@ jobs:
2222
node-version: ${{ matrix.node-version }}
2323
- uses: actions/setup-java@v1
2424
with:
25-
java-version: '12.0.2'
25+
java-version: '8'
2626
architecture: x64
27+
- uses: eskatos/gradle-command-action@v1
28+
with:
29+
arguments: build copyLibToParent
30+
build-root-directory: java-gradle-tasks
31+
wrapper-directory: java-gradle-tasks
2732
- name: Build & test extension
2833
run: |
2934
export DISPLAY=':99.0'
@@ -47,8 +52,13 @@ jobs:
4752
node-version: ${{ matrix.node-version }}
4853
- uses: actions/setup-java@v1
4954
with:
50-
java-version: '12.0.2'
55+
java-version: '8'
5156
architecture: x64
57+
- uses: eskatos/gradle-command-action@v1
58+
with:
59+
arguments: build copyLibToParent
60+
build-root-directory: java-gradle-tasks
61+
wrapper-directory: java-gradle-tasks
5262
- name: Build & test extension
5363
run: |
5464
unset npm_config_prefix
@@ -71,8 +81,13 @@ jobs:
7181
node-version: ${{ matrix.node-version }}
7282
- uses: actions/setup-java@v1
7383
with:
74-
java-version: '12.0.2'
84+
java-version: '8'
7585
architecture: x64
86+
- uses: eskatos/gradle-command-action@v1
87+
with:
88+
arguments: build copyLibToParent
89+
build-root-directory: java-gradle-tasks
90+
wrapper-directory: java-gradle-tasks
7691
- name: Build & test extension
7792
run: |
7893
npm ci
@@ -81,7 +96,7 @@ jobs:
8196
shell: pwsh
8297

8398
publish:
84-
needs: [build-test-linux, build-test-windows]
99+
needs: [build-test-linux, build-test-macos, build-test-windows]
85100
if: github.event_name == 'release' && github.event.action == 'published'
86101
runs-on: ubuntu-18.04
87102

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ node_modules
44
.vscode-test
55
.DS_Store
66
.envrc
7+
lib/**
8+
.classpath
9+
.settings
10+
.idea

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_modules/
33
out/
44
test-fixtures/
55
package-lock.json
6+
java-gradle-tasks/

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ vsc-extension-quickstart.md
1111
**/*.ts
1212
test-fixtures/**
1313
images/**
14+
java-gradle-tasks/**

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Change Log
22

3+
## 2.1.9
4+
5+
- Add loading state and stop command to the explorer view
6+
- Add snippets and basic support for adding new gradle tasks
7+
8+
## 2.1.8
9+
10+
- Fix sub-project build file uri
11+
12+
## 2.1.7
13+
14+
- Change gradle task definition for better support with other task extensions
15+
- Add open build file task content menu action to explorer
16+
- Add community docs
17+
- Better dev tooling & linting
18+
319
## 2.1.6
420

521
- Add support for multi-project builds (subprojects)

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Run gradle tasks in VS Code.
1212
- Run [Gradle tasks](https://gradle.org/) as [VS Code tasks](https://code.visualstudio.com/docs/editor/tasks)
1313
- List & run gradle tasks in the Explorer
1414
- Multi-root workspace folders supported
15-
- Default Groovy/Kotlin & custom build files supported
15+
- Groovy/Kotlin build files supported
1616
- Multi-project builds supported
1717

1818
> **Note:** Local gradle wrapper executables must exist at the root of the workspace folders (either `./gradlew` or `.\gradlew.bat`, depending on your environment).
@@ -22,10 +22,7 @@ Run gradle tasks in VS Code.
2222
This extension contributes the following settings:
2323

2424
- `gradle.autoDetect`: Automatically detect gradle tasks
25-
- `gradle.tasksArgs`: Custom gradle tasks arguments
2625
- `gradle.enableTasksExplorer`: Enable an explorer view for gradle tasks
27-
- `gradle.customBuildFile`: Custom gradle build filename
28-
- `gradle.explorerNestedSubProjects`: Show nested subprojects in the explorer
2926

3027
## Snippets
3128

@@ -35,7 +32,7 @@ This extensions provides snippets for the groovy and kotlin build files:
3532

3633
## Slow Task Provider Warning
3734

38-
[Since vscode v1.40](https://code.visualstudio.com/updates/v1_40#_slow-task-provider-warning), you will start seeing warning notifications when the gradle task provider takes too long.
35+
[Since vscode v1.40](https://code.visualstudio.com/updates/v1_40#_slow-task-provider-warning) you will see warning notifications when the gradle task provider takes too long.
3936

4037
<img src="./images/slow-task-provider-warning.png" width="400" />
4138

java-gradle-tasks/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Ignore Gradle project-specific cache directory
2+
.gradle
3+
4+
# Ignore Gradle build output directory
5+
build
6+
7+
bin
8+
.classpath
9+
.settings

java-gradle-tasks/.project

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>java-gradle-tasks</name>
4+
<comment>Project java-gradle-tasks 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>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "java",
9+
"name": "CodeLens (Launch) - App",
10+
"request": "launch",
11+
"mainClass": "com.github.badsyntax.gradletasks.CliApp",
12+
"projectName": "gradle-tasks",
13+
"args": "../test-fixtures/gradle-groovy-custom-build-file tasks.json",
14+
}
15+
]
16+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml"
3+
}

0 commit comments

Comments
 (0)