-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
45 lines (38 loc) · 1.09 KB
/
build.gradle.kts
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
plugins {
id("groovy")
kotlin("jvm") version "1.3.70"
jacoco
}
java.sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
jcenter()
maven { url = uri("https://repo.jenkins-ci.org/releases/") }
}
tasks.withType<Test> {
useJUnitPlatform()
}
dependencies {
compileOnly("org.codehaus.groovy:groovy-all:3.0.2")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.0")
testImplementation("com.lesfurets:jenkins-pipeline-unit:1.3")
testImplementation("org.mockito:mockito-core:3.3.3")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.6.0")
}
sourceSets["test"].withConvention(GroovySourceSet::class) {
groovy.srcDir("pipelineTests/groovy")
}
sourceSets["main"].withConvention(GroovySourceSet::class) {
groovy.srcDir("src")
}
tasks.jacocoTestReport {
reports {
xml.isEnabled = true
html.destination = file("${buildDir}/jacocoHtml")
}
// classDirectories.setFrom(
// sourceSets.main.get().output.asFileTree.matching {
// exclude("xxx/**/*.class")
// }
// )
}