diff --git a/README.md b/README.md index 24f799e..25bb186 100755 --- a/README.md +++ b/README.md @@ -64,8 +64,8 @@ web application directory each time you run this task. This behavior can be chan * `gaeUpdateDos`: Updates the DoS protection configuration for the app, based on the dos.xml file. * `gaeUpdateIndexes`: Updates datastore indexes in App Engine to include newly added indexes. * `gaeUpdateQueues`: Updates the task queue configuration (queue.xml) in App Engine. -* `gaeUpload`: Uploads files for an application given the application's root directory. The application ID and version are taken from the appengine-web.xml file. -* `gaeUploadAll`: Uploads your application to App Engine and updates all backends by running the task `gaeUpload` and `gaeUpdateAllBackends`. +* `gaeUpdate`: Uploads files for an application given the application's root directory. The application ID and version are taken from the appengine-web.xml file. +* `gaeUpdateAll`: Uploads your application to App Engine and updates all backends by running the task `gaeUpdate` and `gaeUpdateAllBackends`. * `gaeVacuumIndexes`: Deletes unused indexes in App Engine server. * `gaeVersion`: Prints detailed version information about the SDK, Java and the operating system. 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 c024634..149cf5c 100755 --- a/src/main/groovy/org/gradle/api/plugins/gae/GaePlugin.groovy +++ b/src/main/groovy/org/gradle/api/plugins/gae/GaePlugin.groovy @@ -22,15 +22,16 @@ import org.gradle.api.Task import org.gradle.api.artifacts.Configuration import org.gradle.api.artifacts.ConfigurationContainer import org.gradle.api.execution.TaskExecutionGraph +import org.gradle.api.plugins.* +import org.gradle.api.plugins.gae.task.* +import org.gradle.api.plugins.gae.task.appcfg.* +import org.gradle.api.plugins.gae.task.appcfg.backends.* import org.gradle.api.tasks.SourceSet import org.gradle.api.tasks.SourceSetContainer import org.gradle.api.tasks.testing.Test import org.gradle.plugins.ide.eclipse.EclipsePlugin import org.gradle.plugins.ide.idea.IdeaPlugin -import org.gradle.api.plugins.* -import org.gradle.api.plugins.gae.task.* -import org.gradle.api.plugins.gae.task.appcfg.* -import org.gradle.api.plugins.gae.task.appcfg.backends.* + import static org.gradle.api.tasks.SourceSet.MAIN_SOURCE_SET_NAME /** @@ -46,7 +47,7 @@ class GaePlugin implements Plugin { static final String GAE_RUN = 'gaeRun' static final String GAE_STOP = 'gaeStop' static final String GAE_ENHANCE = 'gaeEnhance' - static final String GAE_UPLOAD = 'gaeUpload' + static final String GAE_UPDATE = 'gaeUpdate' static final String GAE_ROLLBACK = 'gaeRollback' static final String GAE_UPDATE_INDEXES = 'gaeUpdateIndexes' static final String GAE_VACUUM_INDEXES = 'gaeVacuumIndexes' @@ -66,7 +67,7 @@ class GaePlugin implements Plugin { static final String GAE_STOP_BACKEND = 'gaeStopBackend' static final String GAE_DELETE_BACKEND = 'gaeDeleteBackend' static final String GAE_CONFIGURE_BACKENDS = 'gaeConfigureBackends' - static final String GAE_UPLOAD_ALL = 'gaeUploadAll' + static final String GAE_UPDATE_ALL = 'gaeUpdateAll' static final String GAE_FUNCTIONAL_TEST = 'gaeFunctionalTest' static final String GRADLE_USER_PROP_PASSWORD = 'gaePassword' static final String STOP_PORT_CONVENTION_PARAM = 'stopPort' @@ -100,7 +101,7 @@ class GaePlugin implements Plugin { configureGaeRun(project, gaePluginConvention, explodedWarDirectory) configureGaeStop(project, gaePluginConvention) configureGaeEnhance(project) - configureGaeUpload(project, explodedWarDirectory) + configureGaeUpdate(project, explodedWarDirectory) configureGaeRollback(project) configureGaeUpdateIndexes(project) configureGaeVacuumIndexes(project) @@ -121,7 +122,7 @@ class GaePlugin implements Plugin { configureGaeStopBackend(project) configureGaeDeleteBackend(project) configureGaeConfigureBackends(project) - configureGaeUploadAll(project) + configureGaeUpdateAll(project) configureGaeFunctionalTest(project, gaePluginConvention) } @@ -274,15 +275,15 @@ class GaePlugin implements Plugin { } } - private void configureGaeUpload(Project project, File explodedWarDirectory) { - project.tasks.withType(GaeUploadTask).whenTaskAdded { GaeUploadTask gaeUploadTask -> - gaeUploadTask.conventionMapping.map(EXPLODED_WAR_DIR_CONVENTION_PARAM) { explodedWarDirectory } + private void configureGaeUpdate(Project project, File explodedWarDirectory) { + project.tasks.withType(GaeUpdateTask).whenTaskAdded { GaeUpdateTask gaeUpdateTask -> + gaeUpdateTask.conventionMapping.map(EXPLODED_WAR_DIR_CONVENTION_PARAM) { explodedWarDirectory } } - GaeUploadTask gaeUploadTask = project.tasks.add(GAE_UPLOAD, GaeUploadTask) - gaeUploadTask.description = 'Uploads your application to App Engine.' - gaeUploadTask.group = GAE_GROUP - gaeUploadTask.dependsOn project.gaeExplodeWar + GaeUpdateTask gaeUpdateTask = project.tasks.add(GAE_UPDATE, GaeUpdateTask) + gaeUpdateTask.description = 'Updates your application on App Engine.' + gaeUpdateTask.group = GAE_GROUP + gaeUpdateTask.dependsOn project.gaeExplodeWar } private void configureGaeRollback(Project project) { @@ -432,11 +433,11 @@ class GaePlugin implements Plugin { gaeConfigureBackendsTask.conventionMapping.map('setting') { project.property(SETTING_PROJECT_PROPERTY) } } - private void configureGaeUploadAll(Project project) { - Task gaeUploadAllTask = project.tasks.add(GAE_UPLOAD_ALL) - gaeUploadAllTask.description = 'Uploads your application to App Engine and updates all backends.' - gaeUploadAllTask.group = GAE_GROUP - gaeUploadAllTask.dependsOn project.gaeUpload, project.gaeUpdateAllBackends + private void configureGaeUpdateAll(Project project) { + Task gaeUpdateAllTask = project.tasks.add(GAE_UPDATE_ALL) + gaeUpdateAllTask.description = 'Updates your application and all backends on App Engine.' + gaeUpdateAllTask.group = GAE_GROUP + gaeUpdateAllTask.dependsOn project.gaeUpdate, project.gaeUpdateAllBackends } private void configureGaeFunctionalTest(Project project, GaePluginConvention convention) { diff --git a/src/main/groovy/org/gradle/api/plugins/gae/task/appcfg/GaeUploadTask.groovy b/src/main/groovy/org/gradle/api/plugins/gae/task/appcfg/GaeUpdateTask.groovy similarity index 82% rename from src/main/groovy/org/gradle/api/plugins/gae/task/appcfg/GaeUploadTask.groovy rename to src/main/groovy/org/gradle/api/plugins/gae/task/appcfg/GaeUpdateTask.groovy index c985582..2c0500d 100644 --- a/src/main/groovy/org/gradle/api/plugins/gae/task/appcfg/GaeUploadTask.groovy +++ b/src/main/groovy/org/gradle/api/plugins/gae/task/appcfg/GaeUpdateTask.groovy @@ -19,28 +19,28 @@ import org.gradle.api.plugins.gae.task.Explodable import org.gradle.api.tasks.InputDirectory /** - * Google App Engine task uploading your application to the server. + * Google App Engine task updating your application on the server. * * @see Documentation * @author Benjamin Muschko */ -class GaeUploadTask extends GaeAppConfigTaskTemplate implements Explodable { +class GaeUpdateTask extends GaeAppConfigTaskTemplate implements Explodable { static final String COMMAND = 'update' @InputDirectory File explodedWarDirectory @Override String startLogMessage() { - 'Starting upload process...' + 'Starting update process...' } @Override String errorLogMessage() { - 'An error occurred uploading the application to App Engine.' + 'An error occurred updating the application on App Engine.' } @Override String finishLogMessage() { - 'Finished uploading process.' + 'Finished updating process.' } @Override