-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
143 lines (127 loc) · 3.83 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/*
* Copyright (c) 2021 - 2023 tracetronic GmbH
*
* SPDX-License-Identifier: MIT
*/
import org.gradle.plugins.ide.idea.model.IdeaLanguageLevel
plugins {
id 'groovy'
id 'idea'
}
group 'de.tracetronic.jenkins'
description 'This is a shared library to extend Jenkins pipelines and to keep code DRY.'
sourceCompatibility = 17
targetCompatibility = 17
sourceSets {
main {
groovy {
srcDirs = ['src', 'vars']
}
resources {
srcDirs = ['resources']
}
}
test {
groovy {
srcDirs = ['test']
}
resources {
srcDirs = ['test/resources']
}
}
}
repositories {
mavenCentral()
maven {
url 'https://repo.jenkins-ci.org/public/'
}
}
dependencies {
implementation 'org.codehaus.groovy:groovy-all:2.5.23'
implementation 'org.jenkins-ci.main:jenkins-core:2.426.3'
implementation 'org.jenkins-ci.plugins.workflow:workflow-api:1291.v51fd2a_625da_7@jar'
implementation 'org.jenkins-ci.plugins.workflow:workflow-support:839.v35e2736cfd5c@jar'
implementation 'org.jenkins-ci.plugins.pipeline-stage-view:pipeline-rest-api:2.34@jar'
implementation 'com.cloudbees:groovy-cps:3659.v582dc37621d8@jar'
testImplementation 'com.lesfurets:jenkins-pipeline-unit:1.22'
testImplementation('org.testcontainers:spock:1.15.3'){
exclude group: 'org.spockframework', module: 'spock-core'
}
testImplementation 'org.hamcrest:hamcrest-core:2.2@jar'
testImplementation 'org.jenkins-ci.main:jenkins-war:2.426.3'
testImplementation 'org.jenkins-ci.main:jenkins-test-harness:2112.ve584e0edc63b_'
testImplementation 'org.jenkins-ci.plugins:structs:337.v1b_04ea_4df7c8@jar'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-cps:3894.3896.vca_2c931e7935@jar'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-job:1385.vb_58b_86ea_fff1@jar'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-step-api:657.v03b_e8115821b_@jar'
testImplementation 'org.powermock:powermock-core:2.0.9'
testImplementation 'org.spockframework:spock-core:1.3-groovy-2.5'
}
configurations.configureEach {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'com.google.guava' && details.requested.name == 'guava') {
/* org.jenkins-ci.main:jenkins-core:2.426.3 use com.google.guava:guava:32.1.1-jre
* which has dependency issues https://github.com/google/guava/issues/6657
*/
details.useVersion '33.2.0-jre'
}
}
}
test {
filter {
includeTestsMatching('*Test')
}
dependsOn cleanTest
testLogging {
events 'passed', 'skipped', 'failed'
}
}
task integrationTest(type: Test) {
filter {
includeTestsMatching('*IT')
}
dependsOn cleanTest
testLogging {
events 'passed', 'skipped', 'failed'
}
}
groovydoc {
docTitle = "${project.name} documentation"
windowTitle = "${project.name} documentation"
noTimestamp = true
noVersionStamp = true
}
task renameDoc {
doLast {
file('docs/DefaultPackage').renameTo(file('docs/vars'))
}
}
task postGroovyDoc(type: Copy) {
from "${project.docsDir}/groovydoc"
into 'docs'
filter { line -> line.replaceAll('DefaultPackage', 'vars') }
dependsOn groovydoc
}
task deleteOldDocs(type: Delete) {
delete 'docs'
followSymlinks = true
}
task documentation(type: GradleBuild) {
tasks = ['groovydoc', 'deleteOldDocs', 'postGroovyDoc', 'renameDoc']
}
idea {
project {
vcs = 'Git'
jdkName = '17'
languageLevel = '17'
}
module {
jdkName = '17'
languageLevel = new IdeaLanguageLevel('17')
downloadJavadoc = true
downloadSources = true
}
}
wrapper {
gradleVersion = '8.9'
}