-
-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathbuild.gradle
136 lines (121 loc) · 4.2 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
plugins {
id 'pl.allegro.tech.build.axion-release' version '1.3.4'
id 'org.jenkins-ci.jpi' version '0.49.0'
id 'codenarc'
id 'idea'
}
repositories {
maven {
url "https://repo.jenkins-ci.org/public/"
}
jcenter()
maven {
url "https://m2proxy.atlassian.com/repository/public"
}
}
group = 'org.jenkins-ci.plugins'
description = 'JIRA Trigger'
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
sourceSets {
integrationTest {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
}
jiraIntegrationTest {
compileClasspath += main.output + test.output + integrationTest.output
runtimeClasspath += main.output + test.output + integrationTest.output
}
}
configurations {
integrationTestCompileClasspath.extendsFrom testCompileClasspath
integrationTestRuntimeClasspath.extendsFrom testRuntimeClasspath
jiraIntegrationTestCompileClasspath.extendsFrom integrationTestCompileClasspath
jiraIntegrationTestRuntimeClasspath.extendsFrom integrationTestRuntimeClasspath
}
dependencies {
compileOnly 'org.codehaus.groovy:groovy-all:2.4.11'
api('com.atlassian.jira:jira-rest-java-client-core:5.2.1') {
exclude group: 'org.slf4j'
exclude group: 'org.springframework'
exclude group: 'javax.xml.stream', module: 'stax-api'
}
api 'io.atlassian.fugue:fugue:4.7.2'
api('com.google.inject.extensions:guice-multibindings:4.0') {
exclude group: 'com.google.inject', module: 'guice' // already provided by Jenkins
}
testImplementation platform('io.jenkins.tools.bom:bom-2.235.x:918.vae501d2cdc99')
testImplementation 'org.jenkins-ci:test-annotations:1.2'
testImplementation 'org.jenkins-ci.plugins:matrix-auth'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation 'org.spockframework:spock-core:1.0-groovy-2.4'
testImplementation 'cglib:cglib-nodep:3.2.5' // used by Spock
testImplementation 'org.objenesis:objenesis:2.5.1' // used by Spock
integrationTestImplementation 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.1'
integrationTestImplementation 'org.jenkins-ci.main:jenkins-war:2.235.1'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-job'
}
def integrationTest = tasks.register('integrationTest', Test) {
testClassesDirs = sourceSets.integrationTest.output
classpath = sourceSets.integrationTest.runtimeClasspath
mustRunAfter test
}
tasks.register('jiraIntegrationTest', Test) {
testClassesDirs = sourceSets.jiraIntegrationTest.output
classpath = sourceSets.jiraIntegrationTest.runtimeClasspath
mustRunAfter integrationTest
}
tasks.named('check').configure {
dependsOn integrationTest
}
tasks.withType(Test).configureEach {
reports.html.outputLocation.set(file("${reporting.baseDir}/${name}"))
}
jenkinsPlugin {
jenkinsVersion = '2.235.1'
pluginId = 'jira-trigger'
humanReadableName = 'JIRA Trigger Plugin'
homePage = uri('http://wiki.jenkins-ci.org/display/JENKINS/JIRA+Trigger+Plugin')
gitHubUrl = 'https://github.com/ceilfors/jira-trigger-plugin'
minimumJenkinsCoreVersion = '0.2.0'
// enable injection of additional tests for checking the syntax of Jelly and other things
generateTests = true
fileExtension = 'jpi'
developers {
developer {
id 'ceilfors'
name 'Wisen Tanasa'
email 'wisen@ceilfors.com'
}
}
}
scmVersion {
tag {
prefix = 'v'
versionSeparator = ''
}
}
project.version = scmVersion.version
codenarc {
configFile = file('config/codenarc/rules.groovy')
toolVersion = '1.1'
}
codenarcTest {
configFile = file('config/codenarc/rulesTest.groovy')
}
codenarcIntegrationTest {
configFile = file('config/codenarc/rulesTest.groovy')
}
codenarcJiraIntegrationTest {
configFile = file('config/codenarc/rulesTest.groovy')
}
idea {
module {
testSourceDirs += file('src/integrationTest/groovy')
testSourceDirs += file('src/jiraIntegrationTest/groovy')
scopes.TEST.plus += [ configurations.integrationTestCompileClasspath, configurations.jiraIntegrationTestRuntimeClasspath ]
}
}