forked from opendevstack/ods-jenkins-shared-library
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
122 lines (111 loc) · 3.97 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
plugins {
id 'jacoco'
id 'groovy'
id 'codenarc'
}
group "org.ods"
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
ext {
nexus_url = project.findProperty('nexus_url') ?: System.getenv('NEXUS_HOST')
nexus_user = project.findProperty('nexus_user') ?: System.getenv('NEXUS_USERNAME')
nexus_pw = project.findProperty('nexus_pw') ?: System.getenv('NEXUS_PASSWORD')
no_nexus = (project.findProperty('no_nexus') ?: System.getenv('NO_NEXUS') ?: false).toBoolean()
}
repositories {
if (no_nexus) {
println("using repositories 'jcenter' and 'mavenCentral'")
jcenter()
mavenCentral()
maven {
url "https://repo1.maven.org/maven2/"
mavenContent {
releasesOnly()
}
}
maven {
url "https://repo.jenkins-ci.org/releases/"
mavenContent {
releasesOnly()
}
}
} else {
println("using nexus repositories")
if (!nexus_url) {
throw new GradleException('Nexus URL not specified!')
}
def nexusMaven = { repoUrl ->
maven {
credentials {
username = "${nexus_user}"
password = "${nexus_pw}"
}
url repoUrl
}
}
nexusMaven("${nexus_url}/repository/jcenter/")
nexusMaven("${nexus_url}/repository/maven-public/")
nexusMaven("${nexus_url}/repository/atlassian_public/")
nexusMaven("${nexus_url}/repository/jenkins-ci-releases/")
}
}
dependencies {
implementation "com.cloudbees:groovy-cps:1.29"
implementation "org.codehaus.groovy:groovy-all:2.4.12"
implementation "org.jenkins-ci.main:jenkins-core:2.46.3"
implementation group: 'org.jenkins-ci.plugins.workflow', name: 'workflow-api', version: '2.36', ext: 'jar'
implementation group: 'org.jenkins-ci.plugins.workflow', name: 'workflow-step-api', version: '2.13', ext: 'jar'
implementation group: 'org.jenkins-ci.plugins.workflow', name: 'workflow-cps', version: '2.41', ext: 'jar'
implementation 'org.slf4j:jcl-over-slf4j:1.7.30'
implementation 'ch.qos.logback:logback-classic:1.2.3'
implementation "com.konghq:unirest-java:2.4.03:standalone"
implementation "fr.opensagres.xdocreport:fr.opensagres.poi.xwpf.converter.core:2.0.2"
implementation "fr.opensagres.xdocreport:fr.opensagres.poi.xwpf.converter.pdf:2.0.2"
implementation "net.lingala.zip4j:zip4j:2.1.1"
implementation "org.apache.ivy:ivy:2.2.0"
implementation "org.apache.pdfbox:pdfbox:2.0.17"
implementation "org.apache.poi:poi:4.0.1"
implementation "org.yaml:snakeyaml:1.24"
implementation 'com.vladsch.flexmark:flexmark-all:0.60.2' // for markdown to pdf conversion (sonarqube reports)
testImplementation "org.spockframework:spock-core:1.3-groovy-2.4"
testImplementation "com.lesfurets:jenkins-pipeline-unit:1.3"
testImplementation "net.bytebuddy:byte-buddy:1.10.8"
testImplementation "org.objenesis:objenesis:3.1"
testImplementation "cglib:cglib-nodep:3.3.0" // for mocking classes
testImplementation "com.github.stefanbirkner:system-rules:1.19.0" // for managing environment variables
testImplementation "com.github.tomakehurst:wiremock:2.26.0" // for mocking HTTP server reponses
testImplementation "org.hamcrest:hamcrest:2.1"
}
sourceSets {
main {
groovy {
srcDirs = ["src", "vars"]
}
}
test {
groovy {
srcDirs = ['test/groovy']
}
resources {
srcDir 'test/resources'
}
}
}
compileGroovy {
groovyOptions.configurationScript = file("gradle/config.groovy")
}
test {
testLogging {
showStandardStreams = true
}
}
codenarc {
configFile = file('codenarc.groovy')
maxPriority1Violations = 0
maxPriority2Violations = 0
maxPriority3Violations = 1827
reportFormat = 'html'
}
codenarcTest {
ignoreFailures = true
}