-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
103 lines (86 loc) · 3.45 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
import org.apache.tools.ant.filters.*
apply plugin: 'groovy'
// Workaround for java.lang.OutOfMemoryError: Java heap space during compileGroovy phase
compileGroovy.groovyOptions.fork(memoryMaximumSize: '1024m')
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.google.cloud.tools:appengine-gradle-plugin:+'
classpath 'org.akhikhl.gretty:gretty:+'
}
}
apply plugin: 'war'
apply plugin: 'maven'
apply plugin: 'org.akhikhl.gretty'
apply plugin: 'com.google.cloud.tools.appengine'
group = "edu.harvard.chs"
version = "0.0.1-SNAPSHOT"
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
jcenter()
mavenCentral()
}
dependencies {
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
providedCompile 'com.google.appengine:appengine:+'
compile group: 'commons-io', name: 'commons-io', version: '2.5'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.1'
compile group: 'log4j', name: 'log4j', version: '1.2.15', ext: 'jar'
compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.7'
compile group: 'com.google.apis', name: 'google-api-services-oauth2', version: 'v1-rev129-1.22.0'
compile group: 'com.google.apis', name: 'google-api-services-fusiontables', version: 'v2-rev15-1.22.0'
compile group: 'com.google.http-client', name: 'google-http-client-jackson2', version: '1.22.0'
compile group: 'com.google.oauth-client', name: 'google-oauth-client-jetty', version: '1.22.0'
compile group: 'com.google.oauth-client', name: 'google-oauth-client-servlet', version: '1.22.0'
compile group: 'com.google.api-client', name: 'google-api-client-appengine', version: '1.22.0'
compile group: 'com.google.appengine', name: 'appengine-api-1.0-sdk', version: '1.9.48'
}
gretty {
httpPort = 8988
// This filters resources which we can access from compiled groovy classes.
// See: http://mrhaki.blogspot.com/2010/11/gradle-goodness-add-filtering-to.html
// and http://forums.gradle.org/gradle/topics/sourcesetcontainer_all_removed_in_1_0m9
processResources {
filesMatching '**/*.properties', { FileCopyDetails fileDetails ->
logger.warn 'File filtered: {}', fileDetails.path
filter(ReplaceTokens, tokens: ['administratorEmail': administratorEmail, 'authorizationTable': authorizationTable, 'capabilitiesUrl': capabilitiesUrl, 'fileCredentialStore': fileCredentialStore, 'validTables': validTables])
}
}
webappCopy {
filesMatching '*', { FileCopyDetails fileDetails ->
logger.warn 'File filtered: {}', fileDetails.path
filter(ReplaceTokens, tokens: ['administratorEmail': administratorEmail, 'authorizationTable': authorizationTable, 'capabilitiesUrl': capabilitiesUrl, 'fileCredentialStore': fileCredentialStore, 'validTables': validTables])
}
}
}
appengine {
deploy { // deploy configuration
stopPreviousVersion = true // default - stop the current version
promote = true // default - & make this the current version
}
}
def allProcessResourcesTasks() {
sourceSets*.processResourcesTaskName.collect {
tasks[it]
}
}
task srcCopy(type: Copy) {
from(file('src/main/webapp'))
into('build/webapp/cite-collection-manager')
}
task srcZip(type: Zip, dependsOn: srcCopy) {
classifier = 'sources'
from(file('build/webapp'))
}
artifacts {
archives srcZip
}
task explodedWar(type: Copy) {
into "$buildDir/exploded"
with war
}
war.dependsOn explodedWar