mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-29 09:10:07 +00:00
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
This commit is contained in:
parent
835c7df795
commit
b7e544e6f1
1 changed files with 3 additions and 3 deletions
|
@ -88,7 +88,7 @@ function _gradle_arguments() {
|
||||||
# and if so, regenerate the .gradle_tasks cache file
|
# and if so, regenerate the .gradle_tasks cache file
|
||||||
############################################################################
|
############################################################################
|
||||||
_gradle_does_task_list_need_generating () {
|
_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"
|
# Discover the gradle tasks by running "gradle tasks --all"
|
||||||
############################################################################
|
############################################################################
|
||||||
_gradle_tasks () {
|
_gradle_tasks () {
|
||||||
if [[ -f build.gradle ]]; then
|
if [[ -f build.gradle || -f build.gradle.kts ]]; then
|
||||||
_gradle_arguments
|
_gradle_arguments
|
||||||
if _gradle_does_task_list_need_generating; then
|
if _gradle_does_task_list_need_generating; then
|
||||||
_gradle_parse_and_extract_tasks "$(gradle tasks --all)" > .gradletasknamecache
|
_gradle_parse_and_extract_tasks "$(gradle tasks --all)" > .gradletasknamecache
|
||||||
|
@ -154,7 +154,7 @@ _gradle_tasks () {
|
||||||
}
|
}
|
||||||
|
|
||||||
_gradlew_tasks () {
|
_gradlew_tasks () {
|
||||||
if [[ -f build.gradle ]]; then
|
if [[ -f build.gradle || -f build.gradle.kts ]]; then
|
||||||
_gradle_arguments
|
_gradle_arguments
|
||||||
if _gradle_does_task_list_need_generating; then
|
if _gradle_does_task_list_need_generating; then
|
||||||
_gradle_parse_and_extract_tasks "$(./gradlew tasks --all)" > .gradletasknamecache
|
_gradle_parse_and_extract_tasks "$(./gradlew tasks --all)" > .gradletasknamecache
|
||||||
|
|
Loading…
Reference in a new issue