-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.gradle
102 lines (88 loc) · 3.08 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
/*
* 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 "jacoco"
id "java"
id "groovy"
}
// In this section you declare where to find the dependencies of your project
repositories {
// Use 'jcenter' for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
//All sub-projects will now refer to the same 'libs' directory
maven { url 'http://bits.netbeans.org/maven2/' }
maven { url 'https://repo.jenkins-ci.org/releases/' }
jcenter()
maven { url 'https://mvnrepository.com/artifact/' }
mavenLocal()
flatDir {
dirs "jars"
}
}
dependencies {
testImplementation(group: 'junit', name: 'junit', version: '4.13.2')
compile group: 'junit', name: 'junit', version: '4.12'
compile group: 'org.assertj', name: 'assertj-core', version: '3.26.0'
// Jenkis Pipeline JUnit
compile group: 'com.lesfurets', name:'jenkins-pipeline-unit', version: '1.4'
compile group: 'com.cloudbees', name: 'groovy-cps', version: '1.34'
// grapes
compile group: 'org.codehaus.groovy', name: 'groovy-json', version: '3.0.22'
compile group: 'com.github.zafarkhaja', name: 'java-semver', version: '0.10.2'
compile group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
// integration tests dependecies
integrationTestCompile group: 'org.jvnet.mock-javamail',name: 'mock-javamail', version: '1.9'
integrationTestCompile group: 'org.slf4j', name: 'slf4j-nop', version: '2.0.13'
}
// In this section you declare the dependencies for your production and test code
compileGroovy {
// Create temp file.
File temp = File.createTempFile("config", ".groovy");
// Delete temp file when program exits.
temp.deleteOnExit();
// Write to temp file
BufferedWriter out = new BufferedWriter(new FileWriter(temp));
out.write("""\
withConfig(configuration) {
configuration.setDisabledGlobalASTTransformations(['groovy.grape.GrabAnnotationTransformation'] as Set)
}
""".stripIndent());
out.close();
groovyOptions.configurationScript = temp
}
sourceSets {
jobs {
groovy {
srcDirs '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")
dependency("org.jenkins-ci.plugins", "email-ext", "2.63")
}
}
test {
testLogging {
events "PASSED", "FAILED", "SKIPPED"
}
}
integrationTest {
systemProperties 'java.net.preferIPv4Stack' : true
testLogging {
events "PASSED", "FAILED", "SKIPPED"
}
}