vscode-gradle/README.md

78 строки
2.7 KiB
Markdown
Исходник Обычный вид История

2019-10-21 20:33:13 +03:00
# vscode-gradle
2019-10-31 22:35:30 +03:00
[![Marketplace Version](https://vsmarketplacebadge.apphb.com/version-short/richardwillis.vscode-gradle.svg)](https://marketplace.visualstudio.com/items?itemName=richardwillis.vscode-gradle)
2019-12-21 15:53:35 +03:00
[![Build status](https://img.shields.io/github/workflow/status/badsyntax/vscode-gradle/Build)](https://github.com/badsyntax/vscode-gradle/actions?query=workflow%3ABuild)
2019-12-07 17:45:57 +03:00
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=badsyntax_vscode-gradle&metric=security_rating)](https://sonarcloud.io/dashboard?id=badsyntax_vscode-gradle)
2019-10-27 18:54:14 +03:00
2019-12-05 19:26:43 +03:00
Run Gradle tasks in VS Code.
2019-10-20 18:53:00 +03:00
2019-12-14 02:10:42 +03:00
![Screencat](images/screencast.gif)
2019-10-20 19:18:21 +03:00
2019-10-23 19:18:24 +03:00
## Features
2019-10-21 20:58:12 +03:00
- Run [Gradle tasks](https://gradle.org/) as [VS Code tasks](https://code.visualstudio.com/docs/editor/tasks)
2019-12-05 19:26:43 +03:00
- List & run Gradle tasks in the Explorer
2019-10-21 20:58:12 +03:00
2019-12-05 19:26:43 +03:00
> **Note:** Local Gradle wrapper executables must exist at the root of the workspace folders (either `./gradlew` or `.\gradlew.bat`, depending on your environment).
2019-10-20 19:18:21 +03:00
## Extension Settings
2019-10-20 19:18:21 +03:00
This extension contributes the following settings:
2019-12-05 19:26:43 +03:00
- `gradle.autoDetect`: Automatically detect Gradle tasks
- `gradle.enableTasksExplorer`: Enable an explorer view for Gradle tasks
2019-12-21 15:53:35 +03:00
- `gradle.debug`: Show extra debug info in the output panel
2019-10-21 20:33:13 +03:00
## Snippets
This extensions provides snippets for the groovy and kotlin build files:
2019-12-05 19:26:43 +03:00
- `cgt`: Create a new Gradle task
2019-11-08 19:46:48 +03:00
## Slow Task Provider Warning
2019-12-05 19:26:43 +03:00
[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.
2019-11-08 19:46:48 +03:00
2019-12-14 02:10:42 +03:00
<img src="./images/slow-task-provider-warning.png" width="400" />
2019-11-08 19:46:48 +03:00
2019-12-05 19:26:43 +03:00
It can take a while to refresh the Gradle tasks, so you should permanently ignore this warning by clicking on "Don't warn again for Gradle tasks", or add the following to your `settings.json`:
2019-11-08 19:46:48 +03:00
```json
"task.slowProviderWarning": [
"gradle"
]
```
2019-12-11 00:06:10 +03:00
## Troubleshooting
2019-12-12 21:11:37 +03:00
<details><summary>View the Gradle Tasks refresh process output and errors by selecting "Gradle Tasks" in the output panel.</summary>
2019-12-11 00:06:10 +03:00
2019-12-14 02:10:42 +03:00
<img src="./images/output.png" width="600" />
2019-12-11 00:06:10 +03:00
2019-12-12 21:11:37 +03:00
</details>
2019-12-12 21:12:46 +03:00
<details><summary>Gradle Task output and errors will be shown in the Terminal panel after you've run a task.</summary>
2019-12-11 00:06:10 +03:00
2019-12-14 02:10:42 +03:00
<img src="./images/terminal.png" width="600" />
2019-12-11 00:06:10 +03:00
2019-12-12 21:11:37 +03:00
</details>
2019-12-21 15:53:35 +03:00
<details><summary>Set the `gradle.debug` setting to `true` to view websocket messages from the server in the output panel.</summary>
<img src="./images/debug-output.png" width="600" />
</details>
2019-10-20 18:53:00 +03:00
## Credits
- Originally forked from [Cazzar/vscode-gradle](https://github.com/Cazzar/vscode-gradle)
- Heavily inspired by the built-in [npm extension](https://github.com/microsoft/vscode/tree/master/extensions/npm)
## Release Notes
2019-12-12 21:12:46 +03:00
See [CHANGELOG.md](./CHANGELOG.md).
2019-10-20 18:53:00 +03:00
## License
2019-12-12 21:12:46 +03:00
See [LICENSE.md](./LICENSE.md).