-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
67 lines (56 loc) · 1.74 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
apply plugin: 'groovy'
sourceCompatibility = '1.8'
sourceSets {
gdsl {
groovy {
srcDirs 'gdsl'
compileClasspath = compileGroovy.classpath
}
}
jobs {
groovy {
srcDirs 'jobs'
compileClasspath = compileGroovy.classpath
}
}
}
configurations {
all {
resolutionStrategy {
force 'org.netbeans.modules:org-netbeans-insane:RELEASE72'
}
}
jenkinsPlugins {}
testImplementation {
exclude group: 'xalan'
}
}
apply from: 'repositories.gradle'
apply from: 'jenkins_plugins.gradle'
def jobDslVersion = '1.76'
dependencies {
implementation 'org.codehaus.groovy:groovy-all:2.4.17'
implementation "org.jenkins-ci.plugins:job-dsl-core:${jobDslVersion}"
jobsImplementation sourceSets.main.output
testImplementation 'cglib:cglib-nodep:3.1'
testImplementation 'org.objenesis:objenesis:2.1'
testImplementation 'org.spockframework:spock-core:1.0-groovy-2.4'
testImplementation 'org.jenkins-ci.main:jenkins-test-harness:2.56'
testImplementation 'org.jenkins-ci.main:jenkins-war:2.190.2'
testImplementation "org.jenkins-ci.plugins:job-dsl:${jobDslVersion}@jar"
testImplementation 'org.jenkins-ci.plugins:structs:1.20@jar'
}
task resolveJenkinsPlugins(type: Copy) {
from configurations.jenkinsPlugins
include '*.hpi'
include '*.jpi'
into new File(sourceSets.test.output.resourcesDir, 'test-dependencies')
doLast {
def baseNames = source.collect { it.name[0..it.name.lastIndexOf('.')-1] }
new File(destinationDir, 'index').setText(baseNames.join('\n'), 'UTF-8')
}
}
test {
dependsOn tasks.resolveJenkinsPlugins
inputs.files sourceSets.jobs.groovy.srcDirs
}