-
Notifications
You must be signed in to change notification settings - Fork 90
/
build.gradle
149 lines (127 loc) · 4.66 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
145
146
147
148
/*
* build.gradle for iUI
* (c) 2012 by the iUI project members
*
* This file is used to run a local webserver for testing purposes and to
* publish to http://demo.iui-js.org on Google App Engine.
*
* iUI uses ant and build.xml to build the iUI distribution.
* (at some point in the future the build.xml functions may be migrated from
* ant to gradle)
*
* To run a local weberver use:
* ./gradlew gaeRun
*
* To publish to GAE run:
* ./gradlew gaeUpload
*
* If you're not an administrator for http://demo.iui-js.org, you'll need to configure
* your own instance of GAE -- instructions TBD.
*/
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'gae'
apply plugin: 'gaelyk'
apply plugin: 'eclipse'
apply plugin: 'idea'
def compatibilityVersion = 1.5
sourceCompatibility = compatibilityVersion
targetCompatibility = compatibilityVersion
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.gradle.api.plugins:gradle-gae-plugin:0.7'
classpath 'org.gradle.api.plugins:gradle-gaelyk-plugin:0.3.2'
classpath 'eu.appsatori:gradle-fatjar-plugin:0.1.1'
}
}
repositories {
mavenCentral()
}
//sourceSets {
// main {
// output.classesDir = file('web-app/WEB-INF/classes')
// }
//}
dependencies {
def gaeVersion = '1.6.6'
groovy 'org.codehaus.groovy:groovy-all:1.8.6'
compile "com.google.appengine:appengine-api-1.0-sdk:$gaeVersion",
"com.google.appengine:appengine-api-labs:$gaeVersion",
'org.codehaus.groovy:groovy-all:1.8.6'
compile 'org.gaelyk:gaelyk:1.2'
/**
* To add binary plugin just declare it as a dependency. For example,
* uncomment following to add GPars support to your Gaelyk project.
* @see https://github.com/musketyr/gpars-appengine
*/
// compile 'org.codehaus.gpars:gpars-appengine:0.1'
testCompile 'org.gaelyk:gaelyk-spock:0.3.0.1'
testCompile "com.google.appengine:appengine-api-stubs:$gaeVersion",
"com.google.appengine:appengine-testing:$gaeVersion"
functionalTestCompile 'org.codehaus.geb:geb-spock:0.7.0',
'org.seleniumhq.selenium:selenium-firefox-driver:2.20.0'
gaeSdk "com.google.appengine:appengine-java-sdk:$gaeVersion"
}
//webAppDirName = file('web-app')
gae {
downloadSdk = true
warDir = file('web-app')
optimizeWar = true
// jvmFlags = ['-Dappengine.user.timezone=UTC']
}
gaeExplodeWar.dependsOn gaelykPrecompileGroovlet
gaeExplodeWar.dependsOn gaelykPrecompileTemplate
clean {
delete sourceSets*.output.classesDir
}
task copyRuntimeLibraries(type: Sync) {
def webAppLibDirName = 'web-app/WEB-INF/lib'
description = "Copies runtime libraries to $webAppLibDirName."
from configurations.runtime
into webAppLibDirName
}
gaeRun.dependsOn copyRuntimeLibraries
idea {
project {
jdkName = compatibilityVersion
ipr.withXml { provider ->
def node = provider.asNode()
// Set Gradle home
def gradleSettings = node.appendNode('component', [name: 'GradleSettings'])
gradleSettings.appendNode('option', [name: 'SDK_HOME', value: gradle.gradleHomeDir])
}
}
}
eclipse {
project {
name 'gaelyk-project'
file {
whenMerged { project ->
project.natures << 'com.google.appengine.eclipse.core.gaeNature'
project.natures << 'com.google.gdt.eclipse.core.webAppNature'
project.buildCommands << [name: 'com.google.appengine.eclipse.core.enhancerbuilder']
project.buildCommands << [name: 'com.google.appengine.eclipse.core.projectValidator']
project.buildCommands << [name: 'com.google.gdt.eclipse.core.webAppProjectValidator']
}
}
}
classpath {
file {
withXml { xml ->
xml.asNode().classpathentry.find { it.@kind == 'output' && it.@path == 'bin' }.@path = 'web-app/WEB-INF/classes'
xml.asNode().appendNode('classpathentry', [kind: 'con', path: 'com.google.appengine.eclipse.core.GAE_CONTAINER'])
.appendNode('attributes')
.appendNode('attribute', [name: 'org.eclipse.jst.component.nondependency', value: '/web-app/WEB-INF/lib'])
xml.asNode().appendNode('classpathentry', [exported: 'true', kind: 'con', path: 'GROOVY_SUPPORT'])
.appendNode('attributes')
.appendNode('attribute', [name: 'org.eclipse.jst.component.nondependency', value: '/web-app/WEB-INF/lib'])
}
}
}
}
task wrapper(type: Wrapper) {
gradleVersion '1.2'
}