-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
66 lines (49 loc) · 1.44 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/// build.gradle.kts (Jenkins shared library):
/// =========================================
///
/// Access gradle.properties:
/// yes -> "val prop_name = project.extra['prop.name']"
/// no -> "val prop_name = property('prop.name')"
/** 1) Plugins used globally */
plugins {
groovy
jacoco
id("org.sonarqube") version "3.5.0.2730"
}
/** 2) General information regarding the library */
group = project.extra["library.group"]!! as String
version = project.extra["library.version"]!! as String
/** 3) Dependency source configuration */
repositories {
mavenCentral()
gradlePluginPortal()
}
/** 4) Library dependencies */
dependencies {
implementation("org.codehaus.groovy:groovy-all:3.0.14")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
}
/** 5) Source set configuration */
sourceSets {
main.get().groovy.srcDirs("src", "vars")
test.get().groovy.srcDir("test")
}
/** 6) JaCoCo configuration */
jacoco {
toolVersion = "0.8.8"
}
tasks.jacocoTestReport {
reports {
xml.isEnabled = true
}
// INFO: Excludes the files in "vars" as they only call methods in "src"!
classDirectories.setFrom(
sourceSets.main.get().output.asFileTree.matching { exclude("*.class") }
)
}
/** 7) Gradle test configuration */
tasks.withType<Test> {
ignoreFailures = true
testLogging.showStandardStreams = true
}