summaryrefslogtreecommitdiff
path: root/plugins/gradle
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gradle')
-rw-r--r--plugins/gradle/gradle.plugin.zsh19
1 files changed, 3 insertions, 16 deletions
diff --git a/plugins/gradle/gradle.plugin.zsh b/plugins/gradle/gradle.plugin.zsh
index fc4c78c50..9229512f7 100644
--- a/plugins/gradle/gradle.plugin.zsh
+++ b/plugins/gradle/gradle.plugin.zsh
@@ -54,27 +54,14 @@ function in_gradle() {
fi
}
-############################################################################
-# Define the stat_cmd command based on platform behavior
-##########################################################################
-stat -f%m . > /dev/null 2>&1
-if [ "$?" = 0 ]; then
- stat_cmd=(stat -f%m)
-else
- stat_cmd=(stat -L --format=%Y)
-fi
-
############################################################################## Examine the build.gradle file to see if its
# timestamp has changed, and if so, regen
# the .gradle_tasks cache file
############################################################################
_gradle_does_task_list_need_generating () {
- if [ ! -f .gradletasknamecache ]; then return 0;
- else
- accurate=$($stat_cmd .gradletasknamecache)
- changed=$($stat_cmd build.gradle)
- return $(expr $accurate '>=' $changed)
- fi
+ [ ! -f .gradletasknamecache ] && return 0;
+ [ .gradletasknamecache -nt build.gradle ] && return 0;
+ return 1;
}