forked from opensearch-project/opensearch-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
110 lines (93 loc) · 2.62 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
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/
/*
* This build file was generated by the Gradle 'init' task.
*
* This generated file contains a commented-out sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* user guide available at https://docs.gradle.org/3.5/userguide/tutorial_java_projects.html
*/
plugins {
id 'com.mkobit.jenkins.pipelines.shared-library' version '0.10.1'
id 'java'
id 'groovy'
id 'jacoco'
}
repositories {
maven { url 'http://bits.netbeans.org/maven2/' }
maven { url 'https://repo.jenkins-ci.org/releases/' }
jcenter()
maven { url 'https://mvnrepository.com/artifact/' }
mavenLocal()
}
dependencies {
compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.21'
compile group: 'org.assertj', name: 'assertj-core', version: '3.4.1'
compile group: 'com.lesfurets', name:'jenkins-pipeline-unit', version: '1.12'
compile group: 'com.cloudbees', name: 'groovy-cps', version: '1.12'
compile group: 'org.yaml', name: 'snakeyaml', version: '1.29'
}
sourceSets {
main {
groovy {
srcDirs = ['src/jenkins']
}
}
test {
groovy {
srcDirs = ['tests/jenkins']
}
}
jobs {
groovy {
srcDirs 'src/jenkins/jobs'
compileClasspath += main.compileClasspath
}
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
sharedLibrary {
coreVersion = '2.176.2'
testHarnessVersion = '2.54'
pluginDependencies {
workflowCpsGlobalLibraryPluginVersion = '2.16'
dependency('org.jenkins-ci.plugins', 'pipeline-input-step', '2.8')
}
}
test {
if (project.hasProperty("pipeline.stack.write")) {
systemProperty "pipeline.stack.write", project.getProperty("pipeline.stack.write")
}
jacoco {
classDumpDir = file("$buildDir/jacoco/classpathdumps")
}
finalizedBy jacocoTestReport
}
jacoco {
toolVersion = "0.8.7"
}
jacocoTestReport {
dependsOn test
sourceSets sourceSets.main
afterEvaluate {
classDirectories.from = fileTree(
dir: "$buildDir/jacoco/classpathdumps",
includes: [
'**/*_Jenkinsfile.*',
'**/jenkins/*'
],
excludes: [
'**/*\$_get_closure*'
]
)
}
reports {
xml.required = true
}
}