forked from entagen/jenkins-build-per-branch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
50 lines (36 loc) · 1.33 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
apply plugin: 'groovy'
apply plugin: 'idea'
repositories {
mavenCentral()
}
dependencies {
groovy 'org.codehaus.groovy:groovy-all:1.8.6'
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
testCompile 'junit:junit:4.10'
compile 'org.codehaus.groovy.modules.http-builder:http-builder:0.5.2'
}
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()
}
}
}
idea {
project {
jdkName = '1.6'
}
}
task syncWithRepo(dependsOn: 'classes', type: JavaExec) {
main = 'com.entagen.jenkins.Main'
classpath = sourceSets.main.runtimeClasspath
// pass through specified system properties to the call to main
['help', 'jenkinsUrl', 'jenkinsUser', 'jenkinsPassword', 'gitUrl', 'templateJobPrefix', 'templateBranchName', 'branchNameRegex', 'nestedView', 'printConfig', 'dryRun', 'noViews', 'noDelete'].each {
if (System.getProperty(it)) systemProperty it, System.getProperty(it)
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.0'
}