-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into iot-mqtt-refresh
- Loading branch information
Showing
94 changed files
with
549 additions
and
893 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Empty file.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# App Engine Standard & Endpoints Frameworks skeleton | ||
|
||
This is a skeleton example for getting setup with Endpoints Framework v2 for | ||
Java. | ||
|
||
For a more complete example of using Endpoints Framework v2 for Java review | ||
the [backend example](/appengine-java8/endpoints-v2-backend). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
// Copyright 2017 Google Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License.import org.apache.tools.ant.filters.ReplaceTokens | ||
|
||
// [START build_script] | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.2' | ||
classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.3.3' | ||
} | ||
} | ||
// [END build_script] | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
// [START plugin_applys] | ||
apply plugin: 'java' | ||
apply plugin: 'war' | ||
apply plugin: 'com.google.cloud.tools.endpoints-framework-server' | ||
apply plugin: 'com.google.cloud.tools.appengine' | ||
// [END plugin_applys] | ||
|
||
// [START dependencies] | ||
dependencies { | ||
compile 'com.google.endpoints:endpoints-framework:2.0.9' | ||
compile 'com.google.appengine:appengine-api-1.0-sdk:1.9.59' | ||
|
||
compile 'javax.inject:javax.inject:1' | ||
compileOnly 'javax.servlet:javax.servlet-api:3.1.0' | ||
} | ||
// [END dependencies] | ||
|
||
// [START endpoints_server_configuration] | ||
// You must replace YOUR_PROJECT_ID with your Google Cloud Project Id | ||
def projectId = 'YOUR_PROJECT_ID' | ||
|
||
endpointsServer { | ||
// Endpoints Framework Plugin server-side configuration | ||
hostname = "${projectId}.appspot.com" | ||
} | ||
// [END endpoints_server_configuration] | ||
|
||
appengine { // App Engine tasks configuration | ||
deploy { // deploy configuration | ||
version = findProperty("appengine.deploy.version") | ||
|
||
def promoteProp = findProperty("appengine.deploy.promote") | ||
if (promoteProp != null) { | ||
promote = new Boolean(promoteProp) | ||
} | ||
} | ||
} | ||
|
||
sourceCompatibility = 1.8 | ||
targetCompatibility = 1.8 | ||
|
||
task wrapper(type: Wrapper) { | ||
gradleVersion = '3.5' | ||
} | ||
|
||
// this replaces the ${endpoints.project.id} in appengine-web.xml and web.xml | ||
task replaceProjectId(type: Copy) { | ||
from 'src/main/webapp/WEB-INF/' | ||
include '*.xml' | ||
into "build/exploded-${archivesBaseName}/WEB-INF" | ||
expand(endpoints:[project:[id:projectId]]) | ||
filteringCharset = 'UTF-8' | ||
} | ||
assemble.dependsOn replaceProjectId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
<!-- | ||
Copyright 2017 Google Inc. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<project> | ||
<modelVersion>4.0.0</modelVersion> | ||
<packaging>war</packaging> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<groupId>com.example.skeleton</groupId> | ||
<artifactId>endpoints-j8-skeleton</artifactId> | ||
|
||
<parent> | ||
<artifactId>appengine-java8-samples</artifactId> | ||
<groupId>com.google.cloud</groupId> | ||
<version>1.0.0</version> | ||
<relativePath>..</relativePath> | ||
</parent> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
|
||
<maven.compiler.target>1.8</maven.compiler.target> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
</properties> | ||
|
||
<!-- [START pom_dependencies] --> | ||
<dependencies> | ||
<!-- Compile/runtime dependencies --> | ||
<dependency> | ||
<groupId>com.google.endpoints</groupId> | ||
<artifactId>endpoints-framework</artifactId> | ||
<version>2.0.9</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.appengine</groupId> | ||
<artifactId>appengine-api-1.0-sdk</artifactId> | ||
<version>1.9.59</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>javax.servlet-api</artifactId> | ||
<version>3.1.0</version> | ||
<type>jar</type> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.inject</groupId> | ||
<artifactId>javax.inject</artifactId> | ||
<version>1</version> | ||
</dependency> | ||
</dependencies> | ||
<!-- [END pom_dependencies] --> | ||
|
||
<!-- [START pom_build] --> | ||
<build> | ||
<!-- for hot reload of the web application--> | ||
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<version>2.6</version> | ||
<configuration> | ||
<webResources> | ||
<resources> | ||
<directory>${basedir}/src/main/webapp/WEB-INF</directory> | ||
<filtering>true</filtering> | ||
<targetPath>WEB-INF</targetPath> | ||
</resources> | ||
</webResources> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>com.google.cloud.tools</groupId> | ||
<artifactId>appengine-maven-plugin</artifactId> | ||
<version>1.3.2</version> | ||
<configuration> | ||
<!-- deploy configuration --> | ||
</configuration> | ||
</plugin> | ||
<!-- [START endpoints_maven_configuration] --> | ||
<plugin> | ||
<groupId>com.google.cloud.tools</groupId> | ||
<artifactId>endpoints-framework-maven-plugin</artifactId> | ||
<version>1.0.2</version> | ||
<configuration> | ||
<!-- plugin configuration --> | ||
<!-- | ||
You must replace YOUR_PROJECT_ID with your | ||
Google Cloud Project Id | ||
--> | ||
<hostname>YOUR_PROJECT_ID.appspot.com</hostname> | ||
</configuration> | ||
</plugin> | ||
<!-- [END endpoints_maven_configuration] --> | ||
</plugins> | ||
</build> | ||
<!-- [END pom_build] --> | ||
</project> | ||
<!-- [END pom] --> |
Oops, something went wrong.