Skip to content
This repository has been archived by the owner on Sep 17, 2022. It is now read-only.

sync up with templates in android studio #66

Merged
merged 1 commit into from
Feb 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions GcmEndpoints/recipe.xml.ftl
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0"?>
<recipe>
<instantiate from="build.gradle.ftl" to="${projectOut}/build.gradle" />
<merge from="settings.gradle.ftl" to="${topOut}/settings.gradle" />
<instantiate from="root/build.gradle.ftl" to="${projectOut}/build.gradle" />
<merge from="root/settings.gradle.ftl" to="${topOut}/settings.gradle" />

<instantiate from="src/main/MessagingEndpoint.java.ftl" to="${srcOut}/MessagingEndpoint.java" />
<instantiate from="src/main/OfyService.java.ftl" to="${srcOut}/OfyService.java" />
<instantiate from="src/main/RegistrationEndpoint.java.ftl" to="${srcOut}/RegistrationEndpoint.java" />
<instantiate from="src/main/RegistrationRecord.java.ftl" to="${srcOut}/RegistrationRecord.java" />
<instantiate from="root/src/main/MessagingEndpoint.java.ftl" to="${srcOut}/MessagingEndpoint.java" />
<instantiate from="root/src/main/OfyService.java.ftl" to="${srcOut}/OfyService.java" />
<instantiate from="root/src/main/RegistrationEndpoint.java.ftl" to="${srcOut}/RegistrationEndpoint.java" />
<instantiate from="root/src/main/RegistrationRecord.java.ftl" to="${srcOut}/RegistrationRecord.java" />

<instantiate from="src/webapp/appengine-web.xml.ftl" to="${webOut}/WEB-INF/appengine-web.xml" />
<instantiate from="src/webapp/index.html.ftl" to="${webOut}/index.html" />
<instantiate from="src/webapp/web.xml.ftl" to="${webOut}/WEB-INF/web.xml" />
<instantiate from="src/webapp/logging.properties.ftl" to="${webOut}/WEB-INF/logging.properties" />
<instantiate from="root/src/webapp/appengine-web.xml.ftl" to="${webOut}/WEB-INF/appengine-web.xml" />
<instantiate from="root/src/webapp/index.html.ftl" to="${webOut}/index.html" />
<instantiate from="root/src/webapp/web.xml.ftl" to="${webOut}/WEB-INF/web.xml" />
<instantiate from="root/src/webapp/logging.properties.ftl" to="${webOut}/WEB-INF/logging.properties" />

<mkdir at="${webOut}/js" />
<mkdir at="${webOut}/css" />
Expand Down
2 changes: 1 addition & 1 deletion GcmEndpoints/root/build.gradle.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {
compile 'com.google.appengine:appengine-endpoints:${appEngineVersion}'
compile 'com.google.appengine:appengine-endpoints-deps:${appEngineVersion}'
compile 'javax.servlet:servlet-api:2.5'
compile 'com.googlecode.objectify:objectify:4.0b3'
compile 'com.googlecode.objectify:objectify:5.1.9'
compile 'com.ganyo:gcm-server:1.0.2'
}

Expand Down
10 changes: 9 additions & 1 deletion GcmEndpoints/root/src/main/MessagingEndpoint.java.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@ import static ${packageName}.OfyService.ofy;
* authentication! If this app is deployed, anyone can access this endpoint! If
* you'd like to add authentication, take a look at the documentation.
*/
@Api(name = "messaging", version = "v1", namespace = @ApiNamespace(ownerDomain = "${endpointOwnerDomain}", ownerName = "${endpointOwnerDomain}", packagePath="${endpointPackagePath}"))
@Api(
name = "messaging",
version = "v1",
namespace = @ApiNamespace(
ownerDomain = "${endpointOwnerDomain}",
ownerName = "${endpointOwnerDomain}",
packagePath="${endpointPackagePath}"
)
)
public class MessagingEndpoint {
private static final Logger log = Logger.getLogger(MessagingEndpoint.class.getName());

Expand Down
10 changes: 9 additions & 1 deletion GcmEndpoints/root/src/main/RegistrationEndpoint.java.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ import static ${packageName}.OfyService.ofy;
* authentication! If this app is deployed, anyone can access this endpoint! If
* you'd like to add authentication, take a look at the documentation.
*/
@Api(name = "registration", version = "v1", namespace = @ApiNamespace(ownerDomain = "${endpointOwnerDomain}", ownerName = "${endpointOwnerDomain}", packagePath="${endpointPackagePath}"))
@Api(
name = "registration",
version = "v1",
namespace = @ApiNamespace(
ownerDomain = "${endpointOwnerDomain}",
ownerName = "${endpointOwnerDomain}",
packagePath="${endpointPackagePath}"
)
)
public class RegistrationEndpoint {

private static final Logger log = Logger.getLogger(RegistrationEndpoint.class.getName());
Expand Down
6 changes: 3 additions & 3 deletions GcmEndpoints/template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
~ limitations under the License.
-->
<template
format="4"
revision="1"
format="5"
revision="2"
name="App Engine Backend with Google Cloud Messaging"
description="Creates a backend module which uses Google Cloud Messaging (GCM) to send
push notifications from your server to your user's Android devices. The GCM service
Expand All @@ -32,7 +32,7 @@
<parameter id="endpointOwnerDomain" name="Endpoint Owner Domain" type="string" constraints="package" default="mycompany.com"/>
<parameter id="endpointPackagePath" name="Endpoint Package Path" type="string" constraints="package" default="myapp"/>
<parameter id="apiKey" name="Gcm Api Key" type="string" default="REPLACE WITH YOUR API KEY"/>
<parameter id="appEngineVersion" name="AppEngine Version" type="string" default="1.9.18" />
<parameter id="appEngineVersion" name="AppEngine Version" type="string" default="1.9.28" />
<parameter id="docUrl" name="Doc URL" type="string" visibility="false"
default="https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/GcmEndpoints"/>

Expand Down
16 changes: 8 additions & 8 deletions HelloEndpoints/recipe.xml.ftl
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0"?>
<recipe>
<instantiate from="build.gradle.ftl" to="${projectOut}/build.gradle" />
<merge from="settings.gradle.ftl" to="${topOut}/settings.gradle" />
<instantiate from="root/build.gradle.ftl" to="${projectOut}/build.gradle" />
<merge from="root/settings.gradle.ftl" to="${topOut}/settings.gradle" />

<instantiate from="src/main/MyBean.java.ftl" to="${srcOut}/MyBean.java" />
<instantiate from="src/main/MyEndpoint.java.ftl" to="${srcOut}/MyEndpoint.java" />
<instantiate from="root/src/main/MyBean.java.ftl" to="${srcOut}/MyBean.java" />
<instantiate from="root/src/main/MyEndpoint.java.ftl" to="${srcOut}/MyEndpoint.java" />

<instantiate from="src/webapp/appengine-web.xml.ftl" to="${webOut}/WEB-INF/appengine-web.xml" />
<instantiate from="src/webapp/index.html.ftl" to="${webOut}/index.html" />
<instantiate from="src/webapp/web.xml.ftl" to="${webOut}/WEB-INF/web.xml" />
<instantiate from="src/webapp/logging.properties.ftl" to="${webOut}/WEB-INF/logging.properties" />
<instantiate from="root/src/webapp/appengine-web.xml.ftl" to="${webOut}/WEB-INF/appengine-web.xml" />
<instantiate from="root/src/webapp/index.html.ftl" to="${webOut}/index.html" />
<instantiate from="root/src/webapp/web.xml.ftl" to="${webOut}/WEB-INF/web.xml" />
<instantiate from="root/src/webapp/logging.properties.ftl" to="${webOut}/WEB-INF/logging.properties" />

<mkdir at="${webOut}/js" />
<mkdir at="${webOut}/css" />
Expand Down
10 changes: 9 additions & 1 deletion HelloEndpoints/root/src/main/MyEndpoint.java.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ import com.google.api.server.spi.config.ApiNamespace;
import javax.inject.Named;

/** An endpoint class we are exposing */
@Api(name = "myApi", version = "v1", namespace = @ApiNamespace(ownerDomain = "${endpointOwnerDomain}", ownerName = "${endpointOwnerDomain}", packagePath="${endpointPackagePath}"))
@Api(
name = "myApi",
version = "v1",
namespace = @ApiNamespace(
ownerDomain = "${endpointOwnerDomain}",
ownerName = "${endpointOwnerDomain}",
packagePath="${endpointPackagePath}"
)
)
public class MyEndpoint {

/** A simple endpoint method that takes a name and says Hi back */
Expand Down
6 changes: 3 additions & 3 deletions HelloEndpoints/template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
~ limitations under the License.
-->
<template
format="4"
revision="1"
format="5"
revision="2"
name="App Engine Java Endpoints Module"
description="Creates an App Engine backend module which uses Cloud Endpoints to convert
very simple server-side Java code annotations into a RESTful backend API.&lt;br&gt;&lt;br&gt;
Expand All @@ -31,7 +31,7 @@
<parameter id="appId" name="Application Id" type="string" constraints="nonempty" default="myApplicationId"/>
<parameter id="endpointOwnerDomain" name="Endpoint Owner Domain" type="string" constraints="package" default="mycompany.com"/>
<parameter id="endpointPackagePath" name="Endpoint Package Path" type="string" constraints="package" default="myapp"/>
<parameter id="appEngineVersion" name="AppEngine Version" type="string" default="1.9.18" />
<parameter id="appEngineVersion" name="AppEngine Version" type="string" default="1.9.28" />
<parameter id="docUrl" name="Doc URL" type="string" visibility="false"
default="https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/HelloEndpoints"/>

Expand Down
14 changes: 7 additions & 7 deletions HelloWorld/recipe.xml.ftl
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0"?>
<recipe>
<instantiate from="build.gradle.ftl" to="${projectOut}/build.gradle" />
<merge from="settings.gradle.ftl" to="${topOut}/settings.gradle" />
<instantiate from="root/build.gradle.ftl" to="${projectOut}/build.gradle" />
<merge from="root/settings.gradle.ftl" to="${topOut}/settings.gradle" />

<instantiate from="src/main/MyServlet.java.ftl" to="${srcOut}/MyServlet.java" />
<instantiate from="root/src/main/MyServlet.java.ftl" to="${srcOut}/MyServlet.java" />

<instantiate from="src/webapp/appengine-web.xml.ftl" to="${webOut}/WEB-INF/appengine-web.xml" />
<instantiate from="src/webapp/index.html.ftl" to="${webOut}/index.html" />
<instantiate from="src/webapp/web.xml.ftl" to="${webOut}/WEB-INF/web.xml" />
<instantiate from="src/webapp/logging.properties.ftl" to="${webOut}/WEB-INF/logging.properties" />
<instantiate from="root/src/webapp/appengine-web.xml.ftl" to="${webOut}/WEB-INF/appengine-web.xml" />
<instantiate from="root/src/webapp/index.html.ftl" to="${webOut}/index.html" />
<instantiate from="root/src/webapp/web.xml.ftl" to="${webOut}/WEB-INF/web.xml" />
<instantiate from="root/src/webapp/logging.properties.ftl" to="${webOut}/WEB-INF/logging.properties" />

<mkdir at="${webOut}/js" />
<mkdir at="${webOut}/css" />
Expand Down
6 changes: 3 additions & 3 deletions HelloWorld/template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
~ limitations under the License.
-->
<template
format="4"
revision="1"
format="5"
revision="2"
name="App Engine Java Servlet Module"
description="Creates the simplest example of an App Engine backend module containing a Java servlet.
This module contains the smallest amount of boilerplate code, which makes it perfect for setting up
Expand All @@ -30,7 +30,7 @@
<parameter id="moduleType" name="Module Type" type="string" visibility="false" default="Servlet"/>
<parameter id="packageName" name="Package name" type="string" constraints="package|nonempty" default="com.mycompany.myapp"/>
<parameter id="appId" name="Application Id" type="string" constraints="nonempty" default="myApplicationId"/>
<parameter id="appEngineVersion" name="AppEngine Version" type="string" default="1.9.18" />
<parameter id="appEngineVersion" name="AppEngine Version" type="string" default="1.9.28" />
<parameter id="docUrl" name="Doc URL" type="string" visibility="false"
default="https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/HelloWorld"/>

Expand Down