Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Endpoints Framework] Updating migration sample for endpoints framework plugin GA #676

Merged
merged 8 commits into from
May 25, 2017
17 changes: 17 additions & 0 deletions appengine/endpoints-frameworks-v2/migration-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ process is explained [here][8] and a quickstart is provided [here][9].
- [Google Cloud Endpoints Frameworks Gradle Plugin][11]

## Setup
1. Change `YOUR-PROJECT-ID` with your project id in the hostname parameter
defined in either the Maven or Gradle build script. Hostname is used when a
discovery document is generated.

- [Maven - pom.xml](pom.xml#L101)
- [Gradle - build.gradle](build.gradle#L77)

1. [Optional]: User Authenticating with Google Accounts in Web Clients

1. Update the `WEB_CLIENT_ID` in [Constants.java](src/main/java/com/example/helloendpoints/Constants.java)
Expand Down Expand Up @@ -88,6 +95,11 @@ process is explained [here][8] and a quickstart is provided [here][9].

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

1. Generate the discovery document located at
`target/discovery-docs/helloworld-v1-rest.discovery` by using:

`mvn endpoints-framework:discoveryDocs`

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

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

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

1. Generate the discovery document located at
`build/endpointsDiscoveryDocs/helloworld-v1-rest.discovery` by using:

`gradle endpointsDiscoveryDocs`

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

Expand Down
11 changes: 6 additions & 5 deletions appengine/endpoints-frameworks-v2/migration-example/build.gradle
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.3.0'
classpath 'com.google.cloud.tools:appengine-gradle-plugin:+'

// Endpoints Frameworks Gradle plugin
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.0-beta9'
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:+'
}
}
// [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.7'
compile group: 'com.google.endpoints', name: 'endpoints-framework', version: '2.0.7'
// [END endpoints-tools]
// End of Endpoints Frameworks v2.0
}
Expand All @@ -71,11 +71,12 @@ appengine { // App Engine tasks configuration
}
}

/* [START endpoints-server]
// [START endpoints-server]
endpointsServer {
// Endpoints Framework Plugin server-side configuration
hostname = "YOUR-PROJECT-ID.appspot.com"
}
[END endpoints-server] */
// [END endpoints-server]

group = 'com.example.helloendpoints' // Generated output GroupId
version = '1' // Version in generated output
Expand Down
3 changes: 2 additions & 1 deletion appengine/endpoints-frameworks-v2/migration-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ limitations under the License.
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>endpoints-framework-maven-plugin</artifactId>
<version>1.0.0-beta5</version>
<version>1.0.0</version>
<configuration>
<!-- plugin configuration -->
<hostname>YOUR-PROJECT-ID.appspot.com</hostname>
</configuration>
</plugin>
<!-- [END endpoints-frameworks-plugin] -->
Expand Down