Skip to content

Commit 31f9f1c

Browse files
authored
Update the build.gradle (GoogleCloudPlatform#306)
1. More comments to build.gradle 2. add the wrapper jars 3. tags
1 parent b54ad45 commit 31f9f1c

File tree

3 files changed

+37
-26
lines changed

3 files changed

+37
-26
lines changed
+36-25
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,64 @@
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
216
repositories {
3-
jcenter() // Bintray's repository - a fast Maven Central mirror & more
17+
jcenter() // Bintray's repository - a fast Maven Central mirror & more
418
mavenCentral()
519
}
620
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
822
}
923
}
1024

11-
repositories {
25+
repositories { // repositories for Jar's you access in your code
1226
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)
1529
}
1630
jcenter()
1731
mavenCentral()
1832
}
1933

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
2337

2438
dependencies { // Servlet for App Engine Standard -- only one of these need to be uncommented.
2539
// 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:+
2742
// Add your dependencies here.
28-
}
2943
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)
3244
}
3345
3446
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
4050
}
4151
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
4555
}
4656
}
4757
}
4858
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
5161
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]
Binary file not shown.

appengine/helloworld-new-plugins/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Thu Aug 04 16:12:44 PDT 2016
1+
#Wed Aug 17 16:32:26 PDT 2016
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)