From a89ea3461ccbb3094ad8744922ad96cb03b8fe18 Mon Sep 17 00:00:00 2001 From: Marcin Erdmann Date: Thu, 12 Jul 2012 23:57:53 +0100 Subject: [PATCH] Fixed a bug where war explosion was skipped when uploading with warDir specified causing build to fail --- .../groovy/org/gradle/api/plugins/gae/GaePlugin.groovy | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/groovy/org/gradle/api/plugins/gae/GaePlugin.groovy b/src/main/groovy/org/gradle/api/plugins/gae/GaePlugin.groovy index 9cdff0d..8f403b7 100644 --- a/src/main/groovy/org/gradle/api/plugins/gae/GaePlugin.groovy +++ b/src/main/groovy/org/gradle/api/plugins/gae/GaePlugin.groovy @@ -210,9 +210,6 @@ class GaePlugin implements Plugin { gaeExplodeWarTask.description = 'Explodes WAR archive into directory.' gaeExplodeWarTask.group = GAE_GROUP - // If WAR directory gets set we assume we have a fully functional web application, WAR creation/explosion is skipped - gaeExplodeWarTask.onlyIf { !gaePluginConvention.warDir } - project.afterEvaluate { if(isWarOptimizationAllowed(project, gaePluginConvention)) { gaeExplodeWarTask.dependsOn project.slimWar @@ -242,7 +239,11 @@ class GaePlugin implements Plugin { gaeRunTask.description = 'Starts up a local App Engine development server.' gaeRunTask.group = GAE_GROUP - gaeRunTask.dependsOn project.tasks.getByName(GAE_EXPLODE_WAR) + GaeExplodeWarTask gaeExplodeWarTask = project.tasks.getByName(GAE_EXPLODE_WAR) + gaeRunTask.dependsOn gaeExplodeWarTask + + // If WAR directory gets set we assume we have a fully functional web application, WAR creation/explosion is skipped + gaeExplodeWarTask.onlyIf { !gaePluginConvention.warDir || !project.gradle.taskGraph.hasTask(gaeRunTask) } } private void configureGaeStop(Project project, GaePluginConvention gaePluginConvention) {