forked from neoteric-eu/jenkins-build-per-gitflow-branch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
40 lines (34 loc) · 1.36 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
apply plugin: 'groovy'
apply plugin: 'eclipse'
repositories {
mavenCentral()
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.3.3'
compile 'org.apache.ivy:ivy:2.2.0'
compile 'commons-cli:commons-cli:1.2' // should be part of groovy, but not available when running for some reason
compile 'org.jooq:joox:1.2.0'
testCompile 'junit:junit:4.11'
testCompile 'org.assertj:assertj-core:1.7.0'
testCompile 'com.github.stefanbirkner:system-rules:1.7.0'
compile 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.1'
}
task createSourceDirs(description : 'Create empty source directories for all defined sourceSets') << {
sourceSets*.allSource.srcDirs.flatten().each { File sourceDirectory ->
if (!sourceDirectory.exists()) {
println "Making $sourceDirectory"
sourceDirectory.mkdirs()
}
}
}
task syncWithRepo(dependsOn: 'classes', type: JavaExec) {
main = 'com.neoteric.jenkins.Main'
classpath = sourceSets.main.runtimeClasspath
// pass through specified system properties to the call to main
['help', 'jenkinsUrl', 'jenkinsUser', 'jenkinsPassword', 'gitUrl', 'jobPrefix', 'templateJobPrefix', 'dryRun', 'createJobInView', 'noDelete'].each {
if (System.getProperty(it)) systemProperty it, System.getProperty(it)
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.12'
}