I'm currently trying to migrate from Cloud Endpoints 1.0 to Cloud Endpoints Frameworks 2.0.
I've followed the steps outlined here: https://cloud.google.com/appengine/docs/java/endpoints/migrating?authuser=0
In my build.gradle I've replaced:
compile 'com.google.appengine:appengine-endpoints:1.9.42'
compile 'com.google.appengine:appengine-endpoints-deps:1.9.42'
with:
compile 'com.google.endpoints:endpoints-framework:2.0.0-beta.5'
compile 'javax.inject:javax.inject:1'
And in web.xml I've replaced SystemServiceServlet with EndpointsServlet and /_ah/spi/* with /_ah/api/*.
However on compile, I get the following error:
Error:Execution failed for task ':myapp_backend:appengineEndpointsGetClientLibs'. > There was an error running endpoints command get-client-lib: web.xml must have 1 (found:0) SystemServiceServlet servlet
Am I missing something?
Edit, as requested by @saiyr, here's my build.gradle file:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.google.appengine:gradle-appengine-plugin:1.9.42'
}
}
repositories {
jcenter();
}
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'appengine'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
dependencies {
// AppEngine
appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.42'
compile 'javax.servlet:servlet-api:2.5'
// Cloud Endpoints
compile 'com.google.appengine:appengine-endpoints:1.9.42'
compile 'com.google.appengine:appengine-endpoints-deps:1.9.42'
// Cloud Endpoints Frameworks
// compile 'com.google.endpoints:endpoints-framework:2.0.0-beta.7'
// compile 'javax.inject:javax.inject:1'
// Project
compile files('src/main/webapp/WEB-INF/lib/gson-2.3.1.jar')
compile 'com.googlecode.objectify:objectify:5.1.9'
compile 'com.ganyo:gcm-server:1.0.2'
compile 'com.google.appengine.tools:appengine-gcs-client:0.5'
}
appengine {
downloadSdk = true
appcfg {
oauth2 = true
}
endpoints {
getClientLibsOnBuild = true
getDiscoveryDocsOnBuild = true
}
}
UPDATE:
There is now a guide detailing the transition process here: https://github.com/GoogleCloudPlatform/endpoints-framework-gradle-plugin/blob/master/ANDROID_README.md
And here: https://cloud.google.com/endpoints/docs/frameworks/legacy/v1/java/migrating-android
Firebase Authnow mentioned on the Cloud Endpoints landing page but it seems in this recent Google Cloud Platform Blog post it's only for the new beta and that's why I'm trying to migrate across. I use Gradle'sappengineUpdatetask to build and deploy my backend. Is my assumption correct I have to migrate fromCloud Endpoints 1.0toCloud Endpoints Frameworks 2.0to useFirebase Auth? - gbhallgradle appengineUpdatewould trigger theappengineEndpointsGetClientLibstask. Is this an Android Studio file? Can you post yourbuild.gradle? - saiyrbuild.gradlefile (I've reverted back to1.0by commenting out2.0). Note the error I copied was also from when gradle syncs. As you work on endpoints, any idea when support for2.0will be released? I'm not sure how to upgrade without proper gradle support. PS thank you for your work! - gbhall