d0bddee6e3703e78f588d037078606d41a4d6237

Author
ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

feat(gradle): update completion to version 25da917c (#12287)

Co-authored-by: ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com>

Diff

 1diff --git a/.github/dependencies.yml b/.github/dependencies.yml
 2index 98b52ffa91e3de316d0c3be1fe4a542942e7eb32..f760ddcef802fb39de4a93d3097c0345adcde6e9 100644
 3--- a/.github/dependencies.yml
 4+++ b/.github/dependencies.yml
 5@@ -32,7 +32,7 @@ dependencies:
 6   plugins/gradle:
 7     repo: gradle/gradle-completion
 8     branch: master
 9-    version: ea018400d86610d0f79f84debbb33c2d2ef5dbec
10+    version: 25da917cf5a88f3e58f05be3868a7b2748c8afe6
11     precopy: |
12       set -e
13       find . ! -name _gradle ! -name LICENSE -delete
14diff --git a/plugins/gradle/LICENSE b/plugins/gradle/LICENSE
15new file mode 100644
16index 0000000000000000000000000000000000000000..06edf4af2662e174b59c20fca2e3654242bee138
17--- /dev/null
18+++ b/plugins/gradle/LICENSE
19@@ -0,0 +1,19 @@
20+Copyright (c) 2017 Eric Wendelin
21+
22+Permission is hereby granted, free of charge, to any person obtaining a copy of
23+this software and associated documentation files (the "Software"), to deal in
24+the Software without restriction, including without limitation the rights to
25+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
26+of the Software, and to permit persons to whom the Software is furnished to do
27+so, subject to the following conditions:
28+
29+The above copyright notice and this permission notice shall be included in all
30+copies or substantial portions of the Software.
31+
32+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38+SOFTWARE.
39diff --git a/plugins/gradle/_gradle b/plugins/gradle/_gradle
40index f8df928b4d6c9daeddc3ae563e023fb9fa874c0d..ca13fd0b01ea3192983b7cfb0bd068a906e01afc 100644
41--- a/plugins/gradle/_gradle
42+++ b/plugins/gradle/_gradle
43@@ -1,28 +1,4 @@
44 #compdef gradle gradlew gw
45-# THE LINE ABOVE MUST BE THE FIRST LINE OF THIS FILE IN ORDER FOR COMPLETION TO WORK
46-
47-#
48-# Taken from https://github.com/gradle/gradle-completion
49-# Copyright (c) 2017 Eric Wendelin
50-#
51-# Permission is hereby granted, free of charge, to any person obtaining a copy of
52-# this software and associated documentation files (the "Software"), to deal in
53-# the Software without restriction, including without limitation the rights to
54-# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
55-# of the Software, and to permit persons to whom the Software is furnished to do
56-# so, subject to the following conditions:
57-#
58-# The above copyright notice and this permission notice shall be included in all
59-# copies or substantial portions of the Software.
60-#
61-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
62-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
63-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
64-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
65-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
66-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
67-# SOFTWARE.
68-# Terms
69 
70 __gradle-set-project-root-dir() {
71     local dir=`pwd`
72@@ -38,7 +14,7 @@ __gradle-set-project-root-dir() {
73 }
74 
75 __gradle-init-cache-dir() {
76-    cache_dir="$HOME/.gradle/completion"
77+    cache_dir="${GRADLE_USER_HOME:-$HOME/.gradle}/completion"
78     mkdir -p $cache_dir
79 }
80 
81@@ -98,7 +74,7 @@ __gradle-generate-script-cache() {
82         zle -R "Generating Gradle build script cache"
83         # Cache all Gradle scripts
84         local -a gradle_build_scripts
85-        gradle_build_scripts=( $(find $project_root_dir -type f -name "*.gradle" -o -name "*.gradle.kts" 2>/dev/null | egrep -v "$script_exclude_pattern") )
86+        gradle_build_scripts=( $(find $project_root_dir -type f -name "*.gradle" -o -name "*.gradle.kts" 2>/dev/null | grep -E -v "$script_exclude_pattern") )
87         printf "%s\n" "${gradle_build_scripts[@]}" >| $cache_dir/$cache_name
88     fi
89 }
90@@ -125,7 +101,7 @@ __gradle-generate-tasks-cache() {
91     local gradle_all_tasks="" root_tasks="" subproject_tasks="" output_line
92     local -a match
93     for output_line in ${(f)"$(printf "%s\n" "${gradle_tasks_output[@]}")"}; do
94-        if [[ $output_line =~ ^([[:lower:]][[:alnum:][:punct:]]*)([[:space:]]-[[:space:]]([[:print:]]*))? ]]; then
95+        if [[ $output_line =~ ^([[:alpha:]][[:alnum:][:punct:]]*)([[:space:]]-[[:space:]]([[:print:]]*))? ]]; then
96             local task_name="${match[1]}"
97             local task_description="${match[3]}"
98             # Completion for subproject tasks with ':' prefix