项目作者: Akman

项目描述 :
VSCode Tasks Gradle Plugin scans your gradle project and configures VS Code to be able to run all gradle tasks from within VS Code. It will create or update the tasks.json file in the .vscode folder for a workspace.
高级语言: Groovy
项目地址: git://github.com/Akman/vscode-tasks.git
创建时间: 2020-02-20T18:19:30Z
项目社区:https://github.com/Akman/vscode-tasks

开源协议:MIT License

下载


VSCode Tasks Gradle Plugin

Build Status
Code Coverage
License

This plugin scans your gradle project and configures VS Code to be able
to run all gradle tasks from within VS Code. It will create or update
the tasks.json file in the .vscode folder for a workspace.

Applying the plugin

The plugin available through the Gradle plugin exchange and the configuration
for your project is done in the build.gradle file.

  1. plugins {
  2. id "ru.akman.vscode-tasks" version "0.4.0"
  3. }

Tasks

There is one task available in your project:

  • vscodeTasks - create or update VS Code configuration
  1. ./gradlew vscodeTasks

Configuration

You can edit the almost all of the task’s properties, but following properties
are not configurable and set by the plugin itself:

  • group
  • label
  • detail

Below are shown all configurable task’s properties with their default values.
They apply to each task added to the VS Code configuration.

The VS Code customs tasks documentation is available here

  1. vscodeTasks {
  2. prefix = ''
  3. type = 'shell'
  4. command = './gradlew'
  5. args = []
  6. options = [
  7. 'cwd': '',
  8. 'env': [:],
  9. 'shell': [:]
  10. ]
  11. problemMatcher = []
  12. windows = [:]
  13. linux = [:]
  14. osx = [:]
  15. runOptions = [
  16. 'reevaluateOnRerun': true,
  17. 'runOn': 'default'
  18. ]
  19. promptOnClose = true
  20. isBackground = true
  21. presentation = [
  22. 'group': 'gradle',
  23. 'echo': true,
  24. 'reveal': 'always',
  25. 'revealProblems': 'never',
  26. 'focus': true,
  27. 'panel': 'shared',
  28. 'showReuseMessage': true,
  29. 'clear': false
  30. ]
  31. dependsOn = []
  32. dependsOrder = 'parallel'
  33. }

Note that unlike json syntax, groovy syntax is used here. Therefore,
do not forget to replace the curly braces (from json) with square brackets in
the maps definitions.

  • prefix - the prefix used for a task name,
    if prefix is empty the group name will be used as prefix