This repository has been archived by the owner on Apr 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
47 lines (36 loc) · 1.18 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
group 'com.loosebazooka'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'groovy'
sourceCompatibility = 1.7
repositories {
mavenCentral()
}
configurations {
downloader
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile "org.spockframework:spock-core:1.0-groovy-2.4"
downloader "com.google.appengine:appengine-java-sdk:+"
}
task downloadSdk {
def sdkZip = project.configurations.downloader.singleFile
def sdksDir = new File(project.buildDir, "appengine-sdk")
inputs.file sdkZip
outputs.dir sdksDir
def unzippedSdk = new File(sdksDir, sdkZip.name.substring(0, sdkZip.name.lastIndexOf('.')))
project.ext.toolsJar = new File(unzippedSdk, "lib/appengine-tools-api.jar")
doLast {
ant.unzip(src: sdkZip, dest: sdksDir)
}
}
assemble.dependsOn(downloadSdk);
task runConverter(type: JavaExec) {
classpath = files(project.properties.jar.archivePath,project.ext.toolsJar)
main = "com.loosebazooka.Converter"
def yamlOut = new File(project.buildDir, "yaml-out");
args = project.findProperty('webapp.dir')? [project.findProperty('webapp.dir')] : []
systemProperties = ["yaml.out" : yamlOut]
}
runConverter.dependsOn("assemble");