forked from jenkinsci/templating-engine-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
144 lines (126 loc) · 4.24 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
144
plugins {
id 'groovy'
id 'org.jenkins-ci.jpi' version '0.43.0'
id 'jacoco'
id "com.diffplug.gradle.spotless" version "3.29.0"
id 'codenarc'
}
repositories {
jcenter()
maven {
url('https://repo.jenkins-ci.org/public/')
}
}
group = 'org.jenkins-ci.plugins'
version = '2.3'
description = 'Allows users to create tool-agnostic, templated pipelines to be shared by multiple teams'
jenkinsPlugin {
coreVersion = '2.263.1'
shortName = 'templating-engine'
displayName = 'Templating Engine'
url = 'https://github.com/jenkinsci/templating-engine-plugin'
disabledTestInjection = false
localizerOutputDir = "${project.buildDir}/generated-src/localizer"
configureRepositories = false
configurePublishing = true
developers {
developer {
id 'steven-terrana'
name 'Steven Terrana'
email '[email protected]'
}
developer {
id 'carlosokieffebah'
name 'Carlos Okieffe'
email '[email protected]'
}
}
}
dependencies {
// plugin dependencies
implementation 'org.jenkins-ci.plugins.workflow:workflow-multibranch:2.20'
implementation 'org.jenkins-ci.plugins.workflow:workflow-api:2.28'
implementation 'org.jenkins-ci.plugins:branch-api:2.0.20'
implementation 'org.jenkins-ci.plugins:scm-api:2.2.7'
implementation 'org.jenkins-ci.plugins:junit:1.24'
implementation 'org.jenkins-ci.plugins:script-security:1.76'
implementation 'org.jenkinsci.plugins:pipeline-model-definition:1.8.4' // version declarative started supporting JTE
implementation 'org.jgrapht:jgrapht-core:1.4.0'
// unit test dependencies
testImplementation 'junit:junit:4.12'
testImplementation 'org.spockframework:spock-core:1.3-groovy-2.4'
testImplementation 'net.bytebuddy:byte-buddy:1.10.7' // used by Spock
testImplementation 'org.objenesis:objenesis:3.1' // used by Spock
testImplementation(group: 'org.jenkins-ci.plugins', name: 'git', version:'3.9.3', classifier:'tests') {
exclude(module: 'httpclient')
exclude(module: 'annotation-indexer')
}
testImplementation(group: "org.jenkins-ci.main", name: "jenkins-test-harness", version: "2.71")
// test plugins
testImplementation(group: "org.jenkins-ci.plugins.workflow", name: "workflow-support", classifier: "tests")
testImplementation(group: "org.jenkins-ci.plugins", name: "scm-api", version: "2.3.0", classifier: "tests")
testImplementation(group: 'org.jenkins-ci.plugins', name: 'git', version:'4.7.1') {
exclude(module: 'httpclient')
exclude(module: 'annotation-indexer')
}
testImplementation 'org.jenkins-ci.plugins:token-macro:2.13'
testImplementation 'org.jenkins-ci.plugins:matrix-project:1.18'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-aggregator:2.6'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-step-api:2.19'
}
jacocoTestReport {
reports {
html.enabled true
}
}
spotless{
groovy{
target = fileTree("src/main/groovy") + fileTree(dir: "src/main/resources", include: "**/*.groovy") + fileTree("src/test/groovy")
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
licenseHeaderFile 'groovy.header'
}
}
codenarc {
toolVersion = '1.6.1'
configFile = file('./config/codenarc/rules.groovy')
}
codenarcMain{
source = fileTree("src/main/groovy") + fileTree(dir: "src/main/resources", include: "**/*.groovy")
}
codenarcTest{
configFile = file('./config/codenarc/rulesTest.groovy')
}
task codenarc {
description = "Evaluate code against CodeNarc"
dependsOn = [ 'codenarcMain', 'codenarcTest' ]
}
sourceSets {
main{
java{
srcDirs = []
}
groovy {
srcDirs = ["src/main/groovy", "src/main/java"]
exclude "**/package-info.groovy"
}
}
}
groovydoc{
source fileTree("src/main/groovy")
}
/**
* this is necessary so that the groovydocs show up as the javadocs
* on the jenkins plugin site
*/
task javadocJar(type: Jar) {
description "An archive of the JavaDocs for Maven Central"
classifier "javadoc"
from groovydoc
}
tasks.register('printJTEVersion'){
doLast{
println version
}
}