-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
144 lines (114 loc) · 3.91 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
buildscript {
// Dependency Versions
ext{
gaeVer = '1.9.19'
gwtVer = '2.7.0'
}
repositories {
maven { url 'http://dl.bintray.com/steffenschaefer/maven' }
maven { url "https://plugins.gradle.org/m2/" }
maven { url "http://maven.seasar.org/maven2/" }
mavenCentral()
jcenter()
}
dependencies {
classpath "com.google.appengine:gradle-appengine-plugin:$gaeVer"
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
}
}
repositories {
maven { url "http://maven.seasar.org/maven2/" }
mavenCentral()
}
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'appengine'
apply plugin: 'gwt'
apply plugin: 'idea'
apply plugin: 'eclipse'
buildDir = "target"
def appEmail = "[email protected]"
def slim3Version = "1.0.16"
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
configurations {
antClasspath
}
def prepare_gen = {
def genDir = '.apt_gen'
if (new File(genDir).exists() == false)
ant.mkdir(dir: genDir)
}
dependencies {
compile("org.slim3:slim3:1.0.16") {
exclude group: "com.google.appengine", module: "appengine-api-1.0-sdk"
exclude group: "com.google.appengine", module: "appengine-api-labs"
}
compile "org.slim3:slim3-gen:1.0.16"
antClasspath "org.slim3:slim3-gen:1.0.16"
compile files('libs/org.moxieapps.gwt.highcharts-1.7.0.jar')
compile "com.google.gwt:gwt-user:$gwtVer"
compile "com.google.gwt:gwt-dev:$gwtVer"
compile "com.google.appengine:appengine-api-1.0-sdk:$gaeVer"
appengineSdk "com.google.appengine:appengine-java-sdk:$gaeVer"
compile group: 'com.google.appengine.orm', name: 'datanucleus-appengine', version: '2.1.2'
compile group: 'org.datanucleus', name: 'datanucleus-enhancer', version: '3.1.1'
compile group: 'com.google.appengine', name: 'appengine-api-1.0-sdk', version: '1.7.5'
compile group: 'javax.jdo', name: 'jdo-api', version: '3.0.1'
compile group: 'org.datanucleus', name: 'datanucleus-core', version: '3.1.3'
compile group: 'org.datanucleus', name: 'datanucleus-api-jpa', version: '3.1.3'
compile group: 'org.apache.geronimo.specs', name: 'geronimo-jpa_2.0_spec', version: '1.0'
compileOnly "javax.servlet:servlet-api:2.5"
prepare_gen()
compile files ('.apt_gen')
testCompile 'junit:junit:4.11'
testCompile "com.google.appengine:appengine-testing:$gaeVer"
testCompile "com.google.appengine:appengine-api-labs:$gaeVer"
testCompile "com.google.appengine:appengine-api-stubs:$gaeVer"
}
gwt{
//gwtVersion='2.7.0' // Including this seems to remove -user and -dev, along with several app engine dependencies from the gradle listing in Eclipse
modules 'com.usp.kiss.MAIN'
devModules 'com.usp.kiss.MAIN'
}
appengine {
downloadSdk = true
jvmFlags = ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000']
httpPort = 8888
appcfg{
email = "${appEmail}"
noCookies = true
oauth2 = true
}
enhancer {
version = "v2"
api="jpa"
enhanceOnBuild = true
}
}
def apt_gen = {
def genDir = '.apt_gen'
ant {
apt (srcdir : 'src/main/java/com/usp/kiss/shared/model',
destdir : genDir,
classpath : configurations.compile.asPath,
preprocessdir: sourceSets.apt_generated.output.resourcesDir,
encoding : 'UTF-8',
debug : 'on',
compile : true)
}
}
sourceSets {
apt_generated
}
task gen << prepare_gen
gen << apt_gen
ClassLoader antClassLoader = org.apache.tools.ant.Project.class.classLoader
configurations.antClasspath.each { File f ->
antClassLoader.addURL(f.toURI().toURL())
}
ant.properties.warDir='src/main/webapp'
ant.properties.srcDir='src/main/java'
ant.properties.testDir='src/test/java'
ant.importBuild 'build.xml'
compileJava.dependsOn gen