-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
131 lines (111 loc) · 3.92 KB
/
build.gradle
File metadata and controls
131 lines (111 loc) · 3.92 KB
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
import org.apache.ivy.plugins.resolver.URLResolver
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 {
gitHub = {
def resolver = new URLResolver()
resolver.with {
name = 'GitHub'
addArtifactPattern 'http://cloud.github.com/downloads/[organisation]/[module]/[module]-[revision].[ext]'
}
resolver
}
repositories {
add gitHub()
}
dependencies {
classpath 'bmuschko:gradle-gae-plugin:0.5.1'
classpath 'bmuschko:gradle-gaelyk-plugin:0.1'
}
}
repositories {
mavenCentral()
add gitHub()
}
sourceSets {
main {
output.classesDir = file('war/WEB-INF/classes')
}
}
dependencies {
def gaeVersion = '1.6.0'
groovy 'org.codehaus.groovy:groovy-all:1.8.4'
compile "com.google.appengine:appengine-api-1.0-sdk:$gaeVersion",
"com.google.appengine:appengine-api-labs:$gaeVersion",
"com.ocpsoft:ocpsoft-pretty-time:1.0.7",
'glaforge:gaelyk:1.1'
testCompile 'org.spockframework:spock-core:0.5-groovy-1.8', {
exclude group: 'org.codehaus.groovy', name: 'groovy-all'
}
testCompile 'marcoVermeulen:gaelyk-spock:0.2',
"com.google.appengine:appengine-api-stubs:$gaeVersion",
"com.google.appengine:appengine-testing:$gaeVersion",
'javax.servlet:servlet-api:2.5',
'cglib:cglib-nodep:2.2',
'org.objenesis:objenesis:1.2'
gaeSdk "com.google.appengine:appengine-java-sdk:$gaeVersion"
}
webAppDirName = file('war')
gae {
warDir = file('war')
downloadSdk = true
}
clean.doLast {
delete sourceSets*.output.classesDir
}
task copyRuntimeLibraries(type: Sync){
def webAppLibDirName = 'war/WEB-INF/lib'
description = "Copies runtime libraries to $webAppLibDirName."
copy{
from configurations.runtime
into webAppLibDirName
}
}
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 = 'war/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: '/war/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: '/war/WEB-INF/lib'])
}
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.0-milestone-4'
}