forked from sheehan/job-dsl-gradle-example
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.gradle
49 lines (40 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
47
48
49
apply plugin: 'groovy'
sourceSets {
jobs {
groovy {
srcDirs 'jobs'
}
}
}
repositories {
mavenCentral()
jcenter()
maven { url 'http://repo.jenkins-ci.org/releases/' }
}
dependencies {
compile 'org.codehaus.groovy:groovy:2.1.3'
compile 'org.jenkins-ci.plugins:job-dsl-core:1.42'
testCompile('org.spockframework:spock-core:0.7-groovy-2.0') {
exclude module: 'groovy-all'
}
// for the RestApiScriptRunner
compile('org.codehaus.groovy.modules.http-builder:http-builder:0.7.2') {
exclude(module: 'groovy')
}
// for the RestApiScriptRunner and XmlOutputRunner
compile('ant:ant:1.7.0')
}
tasks.getByName('test').inputs.files(sourceSets.jobs.groovy.srcDirs)
task rest(dependsOn: 'classes', type: JavaExec) {
main = 'com.dslexample.rest.RestApiScriptRunner'
classpath = sourceSets.main.runtimeClasspath
systemProperties System.getProperties()
}
task debugXml(dependsOn: 'classes', type: JavaExec) {
main = 'com.dslexample.debug.XmlOutputRunner'
classpath = sourceSets.main.runtimeClasspath
systemProperties System.getProperties()
}
task wrapper(type: Wrapper) {
gradleVersion = '2.4'
}