Skip to content

Commit

Permalink
executing gradlew, when gradlew-file exists (ohmyzsh#6485)
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiMan authored and robbyrussell committed Aug 29, 2018
1 parent aefc434 commit 850bc96
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions plugins/gradle/gradle.plugin.zsh
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
##############################################################################
# A descriptive listing of core Gradle commands
############################################################################

gradle-or-gradlew() {
if [ -f ./gradlew ] ; then
echo "executing gradlew instead of gradle";
./gradlew "$@";
else
gradle "$@";
fi
}

alias gradle=gradle-or-gradlew;

function _gradle_core_commands() {
local ret=1 state
_arguments ':subcommand:->subcommand' && ret=0
Expand Down

0 comments on commit 850bc96

Please sign in to comment.