From 393b09361e31684f8859b43d819ca73df16c759d Mon Sep 17 00:00:00 2001 From: Evan McQuinn Date: Mon, 14 Oct 2013 12:20:40 -0600 Subject: [PATCH] fixing logic which checks if gradle tasks should be reloaded The -nt logic was backwards, causing "gradle tasks" to be executed every time; if build.gradle is newer than .gradletasknamecache then return 0 (i.e. true). --- plugins/gradle/gradle.plugin.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/gradle/gradle.plugin.zsh b/plugins/gradle/gradle.plugin.zsh index 9229512f7..bb40063e0 100644 --- a/plugins/gradle/gradle.plugin.zsh +++ b/plugins/gradle/gradle.plugin.zsh @@ -54,13 +54,14 @@ function in_gradle() { fi } -############################################################################## Examine the build.gradle file to see if its +############################################################################## +# 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 () { [ ! -f .gradletasknamecache ] && return 0; - [ .gradletasknamecache -nt build.gradle ] && return 0; + [ build.gradle -nt .gradletasknamecache ] && return 0; return 1; }