-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
70 lines (60 loc) · 1.61 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
68
69
70
apply plugin: 'groovy'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
sourceSets {
gdsl {
groovy {
srcDirs 'gdsl'
compileClasspath = compileGroovy.classpath
}
}
jenkinsfiles {
groovy {
srcDirs 'jenkinsfiles'
compileClasspath = compileGroovy.classpath
}
}
vars {
groovy {
srcDirs 'vars'
compileClasspath = compileGroovy.classpath
}
}
}
configurations {
jenkinsPlugins
testImplementation.extendsFrom(jenkinsPlugins)
}
apply from: 'repositories.gradle'
apply from: 'jenkins_plugins.gradle'
dependencies {
implementation 'org.codehaus.groovy:groovy-all:2.4.21'
testImplementation 'cglib:cglib-nodep:3.3.0'
testImplementation 'com.homeaway.devtools.jenkins:jenkins-spock:2.1.5'
testImplementation 'com.lesfurets:jenkins-pipeline-unit:1.12'
testImplementation 'javax.servlet:javax.servlet-api:4.0.1'
testImplementation 'org.objenesis:objenesis:3.3'
testImplementation 'org.spockframework:spock-core:1.3-groovy-2.4'
testImplementation 'org.jenkins-ci.main:jenkins-core:2.346.3'
}
task cleanScriptedPipelinesTestData(type: Delete) {
delete 'target/test-classes'
}
task prepareSharedLibraries(type: Copy) {
dependsOn tasks.cleanScriptedPipelinesTestData
from 'vars'
include '*'
into 'target/test-classes'
}
task prepareJenkinsfiles(type: Copy) {
dependsOn tasks.prepareSharedLibraries
from 'jenkinsfiles'
include '*'
into 'target/test-classes'
}
test {
dependsOn tasks.prepareJenkinsfiles
}