bmuschko/gradle-gae-plugin — Issue #7: New Version of SDK Zip Not Exploded if Parent Directory Exists
Author: hbchai
Created: 2011-11-03 04:05:52+00:00
State: open

If build/exploded-gae-sdk already exists, any new SDK zips that are downloaded as a result of changing the value of 'gaeSdk' will not be unpacked. This patch (untested) would probably fix it:

diff --git a/src/main/groovy/org/gradle/api/plugins/gae/task/GaeDownloadSdkTask.groovy b/src/main/groovy/org/gradle/api/plugins/gae/task/GaeDownloadSdkTask.groovy
index 90d2dff..dfa1b69 100644
--- a/src/main/groovy/org/gradle/api/plugins/gae/task/GaeDownloadSdkTask.groovy
+++ b/src/main/groovy/org/gradle/api/plugins/gae/task/GaeDownloadSdkTask.groovy
@@ -37,7 +37,8 @@ class GaeDownloadSdkTask extends ConventionTask {
if(!success) {
throw new GradleException("Could not create exploded Google App Engine SDK directory in ${getExplodedSdkDirectory().canonicalPath}")
}
-
+ }
+ if(!getDownloadedSdkRoot().exists()) {
ant.unzip(src: getGaeSdkZipFile(), dest: getExplodedSdkDirectory())
}