-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
100 lines (84 loc) · 3.17 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
group = 'com.example.appengine' // Generated output GroupId
version = '1.0-SNAPSHOT' // Version in generated output
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'org.akhikhl.gretty'
apply plugin: 'com.google.cloud.tools.appengine'
apply plugin: "net.ltgt.apt"
apply plugin: "net.ltgt.apt-idea"
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
ext {
appengineVersion = "1.9.60"
slim3Version = "1.0.17-SNAPSHOT"
}
buildscript { // Configuration for building
repositories {
jcenter() // Bintray's repository - a fast Maven Central mirror & more
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.google.cloud.tools:appengine-gradle-plugin:+'
classpath 'org.akhikhl.gretty:gretty:+'
classpath "net.ltgt.gradle:gradle-apt-plugin:0.13"
}
}
repositories { // repositories for JARs you access in your code
maven {
url 'https://maven-central.storage.googleapis.com' // Google's mirror of Maven Central
}
jcenter()
mavenCentral()
maven {
url "http://slim3.github.com/slim3/"
}
}
dependencies {
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
providedCompile "com.google.appengine:appengine:${appengineVersion}"
// Add your dependencies here.
compile "com.google.appengine:appengine-endpoints:${appengineVersion}" //add this line to avoid upper comment
compile "com.google.appengine:appengine-endpoints-deps:${appengineVersion}" //works also without this line
compile 'javax.servlet:servlet-api:2.5'
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'com.google.appengine', name: 'appengine-local-runtime', version: appengineVersion
testCompile group: 'com.google.appengine', name: 'appengine-api-stubs', version: appengineVersion
testCompile group: 'com.google.appengine', name: 'appengine-api-1.0-sdk', version: appengineVersion
testCompile group: 'com.google.appengine', name: 'appengine-api-labs', version: appengineVersion
apt "org.slim3:slim3-gen-jsr269:${slim3Version}"
compile "org.slim3:slim3:${slim3Version}"
//compileOnly 'org.projectlombok:lombok:1.16.20'
//apt "org.projectlombok:lombok:1.16.20"
}
gretty {
httpPort = 8080
contextPath = '/'
servletContainer = 'jetty9' // What App Engine Flexible uses
}
appengine {
deploy { // deploy configuration
stopPreviousVersion = true // default - stop the current version
promote = true // default - & make this the current version
}
run {
jvmFlags = ["-Dappengine.fullscan.seconds=5"]//enable hot reloading
// jvmFlags = ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000']
}
}
//ant task
ant.importBuild 'build.xml'
task updateSlim3Gen << {
def file = project.configurations["apt"].files.find { it.name.contains("slim3-gen-js269") }
if (file) {
copy {
from file
into outFile
}
}
}