GoogleCloudPlatform / app-gradle-plugin

The library has moved to https://github.com/GoogleCloudPlatform/appengine-plugins/tree/main/app-gradle-plugin
Apache License 2.0
153 stars 40 forks source link

Standard Java Deploy doesn't seem to update datastore indexes #98

Closed dtgkeithmarsh closed 7 years ago

dtgkeithmarsh commented 7 years ago

I'm not sure this is the gradle plugin's problem, but I don't seem able to deploy datastore indexes. It works using your old plugin.

https://code.google.com/p/googleappengine/issues/detail?id=13538

loosebazooka commented 7 years ago

The behavior has changed. Because datastore indexes is a cloud-project level configuration, it doesn't make sense to deploy it with a single module.

You have to explicitly deploy that yaml. If you want to deploy with every app deploy, you can add it to the deployables path in your build.gradle

appengine {
  deploy {
    deployables = deployables + "${buildDir}/staged-app/WEB-INF/appengine-generated/index.yaml"
  }
}

you can run ./gradlew appengineShowConfiguration to see the resulting configuration, which should show that appengine.deploy.deployables includes both app.yaml and index.yaml

You might see index.yaml in the root of staged-app, do not point deployables to that file, it is scheduled to not be copied there in future versions of appengineStage. Please use the one in staged-app/WEB-INF/appengine-generated/