Improved gradle options (arguments) completion (#5743)
* Sort gradle options for autocompletion
This will allow us to more easily keep the options list up-to-date
* Add missing gradle options to gradle plugin
Reflect documentation at
https://docs.gradle.org/3.2.1/userguide/gradle_command_line.html
Diff
1diff --git a/plugins/gradle/gradle.plugin.zsh b/plugins/gradle/gradle.plugin.zsh
2index 65b9d4685677db96bfe44af1c861d5e939d3da74..0adc04a139ef6233857ca7803f7ebdc93aa0a2c3 100644
3--- a/plugins/gradle/gradle.plugin.zsh
4+++ b/plugins/gradle/gradle.plugin.zsh
5@@ -24,29 +24,60 @@ function _gradle_core_commands() {
6 function _gradle_arguments() {
7 _arguments -C \
8 '-a[Do not rebuild project dependencies]' \
9- '-h[Help]' \
10- '-D[System property]' \
11+ '-b[Specifies the build file]' \
12+ '-c[Specifies the settings file]' \
13 '-d[Log at the debug level]' \
14- '--gui[Launches the Gradle GUI app]' \
15- '--stop[Stop the Gradle daemon]' \
16- '--daemon[Use the Gradle daemon]' \
17- '--no-daemon[Do not use the Gradle daemon]' \
18- '--rerun-task [Specifies that any task optimization is ignored.]' \
19- '-i[Log at the info level]' \
20- '-m[Dry run]' \
21- '-P[Set a project property]' \
22- '-p[Specifies the start directory]' \
23- '--profile[Profile the build time]' \
24- '-q[Log at the quiet level (only show errors)]' \
25- '-v[Print the Gradle version info]' \
26+ '-g[Specifies the Gradle user home directory]' \
27+ '-h[Shows a help message]' \
28+ '-i[Set log level to INFO]' \
29+ '-m[Runs the build with all task actions disabled]' \
30+ '-p[Specifies the start directory for Gradle]' \
31+ '-q[Log errors only]' \
32+ '-s[Print out the stacktrace also for user exceptions]' \
33+ '-t[Continuous mode. Automatically re-run build after changes]' \
34+ '-u[Don''t search in parent directories for a settings.gradle file]' \
35+ '-v[Prints Gradle version info]' \
36 '-x[Specify a task to be excluded]' \
37- '-b[Specifies the build file.]' \
38- '-c[Specifies the settings file.]' \
39- '--continue[Continues task execution after a task failure.]' \
40- '-g[Specifies the Gradle user home directory.]' \
41- '-I[Specifies an initialization script.]' \
42- '--refresh-dependencies[Refresh the state of dependencies.]' \
43- '-u[Don''t search in parent directories for a settings.gradle file.]' \
44+ '-D[Set a system property]' \
45+ '-I[Specifies an initialization script]' \
46+ '-P[Sets a project property of the root project]' \
47+ '-S[Print out the full (very verbose) stacktrace]' \
48+ '--build-file[Specifies the build file]' \
49+ '--configure-on-demand[Only relevant projects are configured]' \
50+ '--console[Type of console output to generate (plain, auto, or rich)]' \
51+ '--continue[Continues task execution after a task failure]' \
52+ '--continuous[Continuous mode. Automatically re-run build after changes]' \
53+ '--daemon[Use the Gradle Daemon]' \
54+ '--debug[Log at the debug level]' \
55+ '--dry-run[Runs the build with all task actions disabled]' \
56+ '--exclude-task[Specify a task to be excluded]' \
57+ '--full-stacktrace[Print out the full (very verbose) stacktrace]' \
58+ '--gradle-user-home[Specifies the Gradle user home directory]' \
59+ '--gui[Launches the Gradle GUI app (Deprecated)]' \
60+ '--help[Shows a help message]' \
61+ '--include-build[Run the build as a composite, including the specified build]' \
62+ '--info[Set log level to INFO]' \
63+ '--init-script[Specifies an initialization script]' \
64+ '--max-workers[Set the maximum number of workers that Gradle may use]' \
65+ '--no-daemon[Do not use the Gradle Daemon]' \
66+ '--no-rebuild[Do not rebuild project dependencies]' \
67+ '--no-search-upwards[Don''t search in parent directories for a settings.gradle file]' \
68+ '--offline[Build without accessing network resources]' \
69+ '--parallel[Build projects in parallel]' \
70+ '--profile[Profile build time and create report]' \
71+ '--project-cache-dir[Specifies the project-specific cache directory]' \
72+ '--project-dir[Specifies the start directory for Gradle]' \
73+ '--project-prop[Sets a project property of the root project]' \
74+ '--quiet[Log errors only]' \
75+ '--recompile-scripts[Forces scripts to be recompiled, bypassing caching]' \
76+ '--refresh-dependencies[Refresh the state of dependencies]' \
77+ '--rerun-task[Specifies that any task optimization is ignored]' \
78+ '--settings-file[Specifies the settings file]' \
79+ '--stacktrace[Print out the stacktrace also for user exceptions]' \
80+ '--status[Print Gradle Daemon status]' \
81+ '--stop[Stop all Gradle Daemons]' \
82+ '--system-prop[Set a system property]' \
83+ '--version[Prints Gradle version info]' \
84 '*::command:->command' \
85 && return 0
86 }