summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Harrigan <dharrigan@users.noreply.github.com>2018-05-08 12:13:11 +0100
committerMarc Cornellà <marc.cornella@live.com>2018-05-08 13:13:11 +0200
commitb7e544e6f171e3bf754d80e3c5b61b4f8f065622 (patch)
treea8c775601f9a619f0644d51ea6b7eb8427952560
parent835c7df795375b7e227215743a593ab847a6ec35 (diff)
downloadzsh-b7e544e6f171e3bf754d80e3c5b61b4f8f065622.tar.gz
zsh-b7e544e6f171e3bf754d80e3c5b61b4f8f065622.tar.bz2
zsh-b7e544e6f171e3bf754d80e3c5b61b4f8f065622.zip
gradle plugin should support kotlin gradle build files (#6529)
This change allows the gradle plugin to recongise build.gradle.kts files and thus generate the autocomplete entries. -=david=- closes #6528
-rw-r--r--plugins/gradle/gradle.plugin.zsh6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/gradle/gradle.plugin.zsh b/plugins/gradle/gradle.plugin.zsh
index 0adc04a13..c7047552d 100644
--- a/plugins/gradle/gradle.plugin.zsh
+++ b/plugins/gradle/gradle.plugin.zsh
@@ -88,7 +88,7 @@ function _gradle_arguments() {
# and if so, regenerate the .gradle_tasks cache file
############################################################################
_gradle_does_task_list_need_generating () {
- [[ ! -f .gradletasknamecache ]] || [[ build.gradle -nt .gradletasknamecache ]]
+ [[ ! -f .gradletasknamecache ]] || [[ build.gradle -nt .gradletasknamecache || build.gradle.kts -nt .gradletasknamecache ]]
}
##############
@@ -144,7 +144,7 @@ _gradle_parse_and_extract_tasks () {
# Discover the gradle tasks by running "gradle tasks --all"
############################################################################
_gradle_tasks () {
- if [[ -f build.gradle ]]; then
+ if [[ -f build.gradle || -f build.gradle.kts ]]; then
_gradle_arguments
if _gradle_does_task_list_need_generating; then
_gradle_parse_and_extract_tasks "$(gradle tasks --all)" > .gradletasknamecache
@@ -154,7 +154,7 @@ _gradle_tasks () {
}
_gradlew_tasks () {
- if [[ -f build.gradle ]]; then
+ if [[ -f build.gradle || -f build.gradle.kts ]]; then
_gradle_arguments
if _gradle_does_task_list_need_generating; then
_gradle_parse_and_extract_tasks "$(./gradlew tasks --all)" > .gradletasknamecache