Open eliotstock opened 9 years ago
The IDE Build->Make Project
doesn't generate the discovery docs automatically because it calls "compile" to allow the IDE to do the necessary work to be useful. The dependency in the Android Project forces the creation of client libraries but NOT discovery docs (because they aren't need for the client libraries or the Android project). The discovery generation can be triggered by the gradle task assemble
which is also called before any run or deploy or explicitly by calling the appengineEndpointsGetDiscoveryDocs
task. If you really want to make it always happen, you can add a task dependency to the appengine side's build.gradle so they are always generated when client libraries are generated.
appengineEndpointsGetClientLibs.dependsOn appengineEndpointsGetDiscoveryDocs
OK, so it was always working for me as long as I deployed to GAE right before I looked for the discovery doc. That's quite obscure and hard to understand, especially when staring at getDiscoveryDocsOnBuild = true
in the build.gradle
. At the least, I think this should be in the README.
Yes, but build
in the context of the gradle/appengine plugin is assemble which creates your application archive (war) and expands it out to run and deploy. I believe the IDE is choosing not to package a war
for Make Project
for efficiency reasons.
I'll modify the README to reflect this.
Discovery docs used to show up under the build directory for my Google Cloud Endpoints module. They no longer do.
My Gradle build file for the API module contains:
and in the Android project next door:
I'm on Android Studio 1.2.1.1. Can't figure out when this stopped working, but possibly when I bumped the API version number, or possibly on the last AS upgrade.