forked from boozallen/jenkins-templating-engine
-
Notifications
You must be signed in to change notification settings - Fork 58
/
build.gradle
145 lines (127 loc) · 4.25 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
145
plugins {
id 'groovy'
id 'org.jenkins-ci.jpi' version '0.50.0-rc.3'
id 'jacoco'
id "com.diffplug.spotless" version "6.20.0"
id 'codenarc'
}
repositories {
mavenCentral()
maven {
url('https://repo.jenkins-ci.org/public/')
}
}
group = 'org.jenkins-ci.plugins'
version = '2.5.3'
description = 'Allows users to create tool-agnostic, templated pipelines to be shared by multiple teams'
jenkinsPlugin {
jenkinsVersion.set('2.387.3')
pluginId.set('templating-engine')
humanReadableName.set('Templating Engine')
homePage.set(uri('https://github.com/jenkinsci/templating-engine-plugin'))
generateTests.set(true)
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 platform('io.jenkins.tools.bom:bom-2.387.x:2278.v47b_4508e256a')
implementation 'org.jenkins-ci.plugins.workflow:workflow-multibranch'
implementation 'org.jenkins-ci.plugins.workflow:workflow-api'
implementation 'org.jenkins-ci.plugins:branch-api'
implementation 'org.jenkins-ci.plugins:scm-api'
implementation 'org.jenkins-ci.plugins:junit'
implementation 'org.jenkins-ci.plugins:script-security'
implementation 'org.jenkinsci.plugins:pipeline-model-definition'
implementation 'org.jgrapht:jgrapht-core:1.4.0'
implementation 'org.jenkins-ci.modules:sshd'
// 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', classifier:'tests') {
exclude(module: 'httpclient')
exclude(module: 'annotation-indexer')
}
testImplementation(group: "org.jenkins-ci.main", name: "jenkins-test-harness", version: "1837.vb_6efb_1790942")
// 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'
testImplementation 'org.jenkins-ci.plugins:matrix-project'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-aggregator:2.6'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-step-api'
}
jacocoTestReport {
reports {
html.required.set(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"
archiveClassifier.set("javadoc")
from groovydoc
}
tasks.register('printJTEVersion'){
doLast{
println version
}
}