forked from Avocarrot/json2view
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
31 lines (23 loc) · 769 Bytes
/
build.gradle
File metadata and controls
31 lines (23 loc) · 769 Bytes
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
apply plugin: 'groovy'
repositories {
mavenCentral()
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.1.6'
}
task runScript(dependsOn: 'classes', type: JavaExec) {
description 'Run Groovy script'
// Set main property to name of Groovy script class.
main = 'ConvertXML2Json'
// Set classpath for running the Groovy script.
classpath = sourceSets.main.runtimeClasspath
if (project.hasProperty('xml')) {
// Pass command-line argument to script.
args new File(".").absolutePath + File.separator + project.getProperty('xml')
}
if (project.hasProperty('output')) {
// Pass output type command-line argument to script.
args project.getProperty('output')
}
}
defaultTasks 'runScript'