84aa274604f33bf440df81fbe73543b072018d47

Author
Janosch Schwalm <janosch.schwalm@gmail.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

executing gradlew, when gradlew-file exists (#6485)

Diff

 1diff --git a/plugins/gradle/gradle.plugin.zsh b/plugins/gradle/gradle.plugin.zsh
 2index c7047552de3622fd2ca45197fd6d1075773249fe..8df62c2e28a1e8448e6486c783d38b0f56f60e22 100644
 3--- a/plugins/gradle/gradle.plugin.zsh
 4+++ b/plugins/gradle/gradle.plugin.zsh
 5@@ -1,6 +1,18 @@
 6 ##############################################################################
 7 # A descriptive listing of core Gradle commands
 8 ############################################################################
 9+
10+gradle-or-gradlew() {
11+	if [ -f ./gradlew ] ; then
12+		echo "executing gradlew instead of gradle";
13+		./gradlew "$@";
14+	else
15+		gradle "$@";
16+	fi
17+}
18+
19+alias gradle=gradle-or-gradlew;
20+
21 function _gradle_core_commands() {
22     local ret=1 state
23     _arguments ':subcommand:->subcommand' && ret=0