|
1 |
| -buildscript { |
| 1 | +// Copyright 2015 Google Inc. All Rights Reserved. |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | +// [start gradle] |
| 15 | +buildscript { // Configuration for building |
2 | 16 | repositories {
|
3 |
| - jcenter() // Bintray's repository - a fast Maven Central mirror & more |
| 17 | + jcenter() // Bintray's repository - a fast Maven Central mirror & more |
4 | 18 | mavenCentral()
|
5 | 19 | }
|
6 | 20 | dependencies {
|
7 |
| - classpath 'com.google.cloud.tools:appengine-gradle-plugin:+' // latest App Engine Gradle plugin |
| 21 | + classpath 'com.google.cloud.tools:appengine-gradle-plugin:+' // latest App Engine Gradle tasks |
8 | 22 | }
|
9 | 23 | }
|
10 | 24 |
|
11 |
| -repositories { |
| 25 | +repositories { // repositories for Jar's you access in your code |
12 | 26 | maven {
|
13 |
| - url 'https://maven-central.storage.googleapis.com' // Google's mirror of Maven Central |
14 |
| -// url 'https://oss.sonatype.org/content/repositories/snapshots' // SNAPSHOT Reposiotry (if needed) |
| 27 | + url 'https://maven-central.storage.googleapis.com' // Google's mirror of Maven Central |
| 28 | +// url 'https://oss.sonatype.org/content/repositories/snapshots' // SNAPSHOT Reposiotry (if needed) |
15 | 29 | }
|
16 | 30 | jcenter()
|
17 | 31 | mavenCentral()
|
18 | 32 | }
|
19 | 33 |
|
20 |
| -apply plugin: 'java' |
21 |
| -apply plugin: 'war' |
22 |
| -apply plugin: 'com.google.cloud.tools.appengine' |
| 34 | +apply plugin: 'java' // standard Java tasks |
| 35 | +apply plugin: 'war' // standard Web Archive plugin |
| 36 | +apply plugin: 'com.google.cloud.tools.appengine' // App Engine tasks |
23 | 37 |
|
24 | 38 | dependencies { // Servlet for App Engine Standard -- only one of these need to be uncommented.
|
25 | 39 | // providedCompile group: 'javax.servlet', name: 'servlet-api', version:'2.5'
|
26 |
| - providedCompile 'javax.servlet:javax.servlet-api:3.1.0' // if beta-quickstart in appengine-web.xml |
| 40 | + providedCompile 'javax.servlet:javax.servlet-api:3.1.0' // if java_quickstart in appengine-web.xml |
| 41 | + compile 'com.google.appengine:appengine:+ |
27 | 42 | // Add your dependencies here.
|
28 |
| -} |
29 | 43 |
|
30 |
| -task wrapper(type: Wrapper) { // use the gradle wrapper "./gradlew.sh ..." |
31 |
| - gradleVersion = '2.14' // "gradle wrapper --gradle-version 2.14" (to create files and directories) |
32 | 44 | }
|
33 | 45 |
|
34 | 46 | model {
|
35 |
| - appengine { |
36 |
| - run { // dev appserver configuration (standard environments only) |
37 |
| - jvmFlags = ['-Dappengine.user.timezone=UTC'] |
38 |
| - host = '127.0.0.1' |
39 |
| - port = 8080 |
| 47 | + appengine { // App Engine tasks configuration |
| 48 | + run { // local (dev_appserver) configuration (standard environments only) |
| 49 | + port = 8080 // default |
40 | 50 | }
|
41 | 51 |
|
42 |
| - deploy { // deploy configuration |
43 |
| - promote = true |
44 |
| - stopPreviousVersion = true |
| 52 | + deploy { // deploy configuration |
| 53 | + stopPreviousVersion = true // default - stop the current version |
| 54 | + promote = true // default - & make this the current version |
45 | 55 | }
|
46 | 56 | }
|
47 | 57 | }
|
48 | 58 |
|
49 |
| -group = 'com.example.appengine' |
50 |
| -version = '1.0-SNAPSHOT' |
| 59 | +group = 'com.example.appengine' // Generated output GroupId |
| 60 | +version = '1.0-SNAPSHOT' // Version in generated output |
51 | 61 |
|
52 |
| -sourceCompatibility = JavaVersion.VERSION_1_7 |
53 |
| -targetCompatibility = JavaVersion.VERSION_1_7 |
| 62 | +sourceCompatibility = JavaVersion.VERSION_1_7 // App Engine Standard uses Java 7 |
| 63 | +targetCompatibility = JavaVersion.VERSION_1_7 // App Engine Standard uses Java 7 |
| 64 | +// [end gradle] |
0 commit comments