Skip to content

Commit

Permalink
Merge pull request #661 from GoogleCloudPlatform/update-endpoints-sample
Browse files Browse the repository at this point in the history
Update Endpoints Migration Sample
  • Loading branch information
frankyn authored May 11, 2017
2 parents 853233b + 3e8ebfa commit 3886762
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 18 deletions.
4 changes: 2 additions & 2 deletions appengine/endpoints-frameworks-v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The new Google Cloud Endpoints Frameworks for App Engine provides
It's recommended that you migrate projects using the prior version of [Cloud Endpoints Frameworks][1].


[1]: https://cloud.google.com/appengine/docs/java/endpoints/
[2]: https://cloud.google.com/appengine/docs/java/endpoints/migrating
[1]: https://cloud.google.com/endpoints/docs/frameworks/legacy/v1/java
[2]: https://cloud.google.com/endpoints/docs/frameworks/legacy/v1/java/migrating
[3]: https://cloud.google.com/endpoints/docs/frameworks/java/about-cloud-endpoints-frameworks
[4]: https://cloud.google.com/endpoints/docs/frameworks/java/quickstart-frameworks-java
33 changes: 23 additions & 10 deletions appengine/endpoints-frameworks-v2/migration-example/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Hello World Google Cloud Endpoints for App Engine

This sample provides an example of a [migration][7] from the prior version of
[Google Cloud Endpoints Frameworks][3] to new [Google Cloud Endpoints Frameworks for App Engine][8].
[Google Cloud Endpoints Frameworks][3] to new
[Google Cloud Endpoints Frameworks for App Engine][8] using a
**Discovery Document**. Additionally, this sample provides an example of using
the new App Engine Maven and Gradle plugins for deploying your Google App Engine
Standard applications.

This sample contains comments of how to use the prior Endpoints Frameworks as
well. For clarity, the prior Endpoints Frameworks and the new Endpoints
Frameworks are denoted as Endpoints Frameworks v1.0 and Endpoints Frameworks
Expand All @@ -22,6 +27,10 @@ process is explained [here][8] and a quickstart is provided [here][9].
- [Google Cloud Endpoints Frameworks v1.0][3]

## Build and Deployment Plugins
- [Google App Engine Maven plugin][14]
- [Google App Engine Gradle plugin][15]

## Discovery Document and Client Library Generation Plugins
- [Google Cloud Endpoints Frameworks Maven Plugin][10]
- [Google Cloud Endpoints Frameworks Gradle Plugin][11]

Expand All @@ -37,10 +46,12 @@ process is explained [here][8] and a quickstart is provided [here][9].
have registered in the
[Credentials on Developers Console for OAuth 2.0 client IDs][6].

1. [Optional]: User Authenticating with Google Accounts in other Applications Types
1. [Optional]: User Authenticating with Google Accounts in other Applications
Types

- Inside [Constants.java](src/main/java/com/example/helloendpoints/Constants.java) you will find placeholders for Android
applications using Google Accounts client IDs registered in the
- Inside [Constants.java](src/main/java/com/example/helloendpoints/Constants.java)
you will find placeholders for Android applications using Google Accounts
client IDs registered in the
[Credentials on Developers Console for OAuth 2.0 client IDs][6].

- These client IDs are used when defining annotation for this sample API
Expand Down Expand Up @@ -77,8 +88,8 @@ process is explained [here][8] and a quickstart is provided [here][9].

[http://localhost:8080/_ah/api/explorer][13]

1. Generate the client library located at `target/client-libs/helloworld-v1-java.zip`
by using:
1. Generate the client library located at
`target/client-libs/helloworld-v1-java.zip` by using:

`mvn endpoints-framework:clientLibs`

Expand All @@ -100,8 +111,8 @@ process is explained [here][8] and a quickstart is provided [here][9].

[http://localhost:8080/_ah/api/explorer][13]

1. Generate the client library located at `build/endpointsClientLibs/helloworld-v1-java.zip`
by using:
1. Generate the client library located at
`build/endpointsClientLibs/helloworld-v1-java.zip` by using:

`gradle endpointsClientLibs`

Expand All @@ -112,14 +123,16 @@ process is explained [here][8] and a quickstart is provided [here][9].

[1]: https://cloud.google.com/appengine/docs/java/
[2]: http://java.com/en/
[3]: https://cloud.google.com/appengine/docs/java/endpoints/
[3]: https://cloud.google.com/endpoints/docs/frameworks/legacy/v1/java
[4]: https://cloud.google.com/appengine/docs/java/tools/maven
[5]: http://localhost:8080/
[6]: https://console.developers.google.com/project/_/apiui/credential
[7]: https://cloud.google.com/appengine/docs/java/endpoints/migrating
[7]: https://cloud.google.com/endpoints/docs/frameworks/legacy/v1/java/migrating
[8]: https://cloud.google.com/endpoints/docs/frameworks/java/about-cloud-endpoints-frameworks
[9]: https://cloud.google.com/endpoints/docs/frameworks/java/quickstart-frameworks-java
[10]: https://github.com/GoogleCloudPlatform/endpoints-framework-maven-plugin
[11]: https://github.com/GoogleCloudPlatform/endpoints-framework-gradle-plugin
[12]: https://cloud.google.com/endpoints/docs/authenticating-users-frameworks
[13]: http://localhost:8080/_ah/api/explorer
[14]: https://github.com/GoogleCloudPlatform/app-maven-plugin
[15]: https://github.com/GoogleCloudPlatform/app-gradle-plugin
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ buildscript { // Configuration for building
}
dependencies {
// App Engine Gradle plugin
classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.1.1'
classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.3.0'

// Endpoints Frameworks Gradle plugin
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.0-beta6'
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.0-beta9'
}
}
// [END buildscript]
Expand Down Expand Up @@ -55,7 +55,7 @@ dependencies {

// Endpoints Frameworks v2.0
// [START endpoints-tools]
compile group: 'com.google.endpoints', name: 'endpoints-framework-tools', version: '2.0.4'
compile group: 'com.google.endpoints', name: 'endpoints-framework-tools', version: '2.0.7'
// [END endpoints-tools]
// End of Endpoints Frameworks v2.0
}
Expand Down
6 changes: 3 additions & 3 deletions appengine/endpoints-frameworks-v2/migration-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ limitations under the License.
<dependency>
<groupId>com.google.endpoints</groupId>
<artifactId>endpoints-framework</artifactId>
<version>2.0.4</version>
<version>2.0.7</version>
</dependency>
<!-- [END endpoints-frameworks] -->
<!-- End of Endpoints Frameworks v2.0 -->
Expand All @@ -85,7 +85,7 @@ limitations under the License.
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.2.1</version>
<version>1.3.1</version>
<configuration>
<!-- deploy configuration -->
</configuration>
Expand All @@ -95,7 +95,7 @@ limitations under the License.
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>endpoints-framework-maven-plugin</artifactId>
<version>1.0.0-beta3</version>
<version>1.0.0-beta5</version>
<configuration>
<!-- plugin configuration -->
</configuration>
Expand Down
1 change: 1 addition & 0 deletions appengine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<module>datastore/indexes-exploding</module>
<module>datastore/indexes-perfect</module>
<module>endpoints-frameworks-v2/backend</module>
<module>endpoints-frameworks-v2/migration-example</module>
<module>firebase-event-proxy/gae-firebase-event-proxy</module>
<module>firebase-tictactoe</module>
<module>guestbook-objectify</module>
Expand Down

0 comments on commit 3886762

Please sign in to comment.