App Engine Gradle Plugin Tasks and Properties Stay organized with collections Save and categorize content based on your preferences.
After the App Engine Gradle plugin isadded to your project,you can use the following App Engine-specific Gradle tasks:
| Task | Description |
|---|---|
tasks | Displays help information on installed tasks. |
appengineStage | Generates an application directory for deployment. |
appengineDeploy | Stages and deploys an application to App Engine. |
appengineDeployCron | Deploys acron.yaml configuration file to App Engine. |
appengineDeployDispatch | Deploys adispatch.yaml configuration file to App Engine. |
appengineDeployDos | Deploys ados.yaml configuration file to App Engine. |
appengineDeployIndex | Deploys anindex.yaml configuration file to App Engine. |
appengineDeployQueue | Deploys aqueue.yaml configuration file to App Engine. |
jettyRun | Runs the development server using Jetty's default configurations. To find out more about theGretty plugin, seeGretty Configuration andGretty Tasks |
To see a list of all the tasks:
gradletasksFor more information on how to set up and use Gradle, seeUsingApp Engine Gradle and theapp-gradle-plugin repository on GitHub.
Task properties
The contents of thegradle.build file are a set of rules to describe yourbuild. It's written in a domain specific language for describing builds, basedon theGroovy language.
Each task has associated properties below that you can use. You can specifythese properties in thegradle.build file using aconfiguration closure,task, and properties.
In this example:
- The configuration closure for the plugin is
appengine. - The task is
deploy. - The properties,
stopPreviousVersionandpromote, are set totrue.
appengine{deploy{// deploy configurationstopPreviousVersion=true// default - stop the current versionpromote=true// default - & make this the current version}}appengine.deploy.stopPreviousVersion=true
See the following sections for a list of the properties that are available foreach task.
appengineStage
task(stage)
Generates an application directory for deployment. Used by theappengineDeploytask and thejettyRun task.
You can use the following properties:
| Property | Description |
|---|---|
artifact | Built artifact that has all of the classes, resources, and manifests. Default isbuild/libs/[YOUR_SERVLET].war. |
appEngineDirectory | Location of theapp.yaml file. Default issrc/main/appengine. |
dockerDirectory | Location of theDockerfile. Default issrc/main/docker. |
stagingDirectory | Required. The directory to which to stage the application. Default isbuild/staged-app. |
appengineDeploy
task(deploy)
Stages and deploys an application to App Engine.
Each task has associated properties below that you can use. You can specifythese properties in thegradle.build file using aconfiguration closure,task, and properties.
In the following example:
- The configuration closure for the plugin is
appengine. - The task is
run. - The property,
port, is set to8080.
appengine{// App Engine tasks configurationrun{// local (dev_appserver) configuration (standard environments only)port=8080// default}deploy{// deploy configurationstopPreviousVersion=true// default - stop the current versionpromote=true// default - & make this the current version}}If you only have a to specify a few properties, you can set them in a singleline:
appengine.run.port=8888
| Property | Description |
|---|---|
appEngineDirectory | Location of.yaml configuration files (cron, index, etc) from which configuration specific deployments (appengineDeployCron, etc) will deploy from. For flexible applications, this defaults tosrc/main/appengine. |
bucket | The Cloud Storage bucket used to stage files associated with the deployment. If this argument is not specified, the application's default bucket is used. |
deployables | The YAML files for the services or configurations you want to deploy. Default is theapp.yaml file in the staging directory. If that is not found, attempts to automatically generate necessary configuration files (such asapp.yaml) in the staging directory. |
imageUrl | Deploy with a specific Docker image. Docker URL must be from one of the valid Artifact Registry hostnames. |
project | The Google Cloud Platform project name to use for this invocation. Default is the current project selected wheninitializing the gcloud tool. To verify, usegcloud config list project. |
promote | Promote the deployed version to receive all traffic. Default is True. |
server | The App Engine server to connect to. Typically, you do not need to change this value. |
stopPreviousVersion | Stop the previously running version when deploying a new version that receives all traffic. |
version | The version of the app that will be created or replaced by this deployment. If you do not specify a version, one will be generated for you. |
Global properties
| Property | Description |
|---|---|
tools.cloudSdkHome | Optional property to configure the location of the Google Cloud CLI. Typically the plugin finds this in the gcloud CLI when it is installed withgcloud components install app-engine-java. |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.