This repository was archived by the owner on Feb 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
66 lines (60 loc) · 2.06 KB
/
build.gradle.kts
File metadata and controls
66 lines (60 loc) · 2.06 KB
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
plugins {
id("with-publish-maven-central")
jacoco
}
tasks.jacocoTestReport {
reports {
xml.required.set(true)
html.required.set(true)
}
dependsOn(tasks.test)
}
task<JacocoReport>("jacocoAggregateReport") {
dependsOn(subprojects.map { it.tasks.withType<Test>() })
dependsOn(subprojects.map { it.tasks.withType<JacocoReport>() })
additionalSourceDirs.setFrom(subprojects.map { it.the<SourceSetContainer>()["main"].allSource.srcDirs })
sourceDirectories.setFrom(subprojects.map { it.the<SourceSetContainer>()["main"].allSource.srcDirs })
classDirectories.setFrom(subprojects.map { it.the<SourceSetContainer>()["main"].output })
executionData.setFrom(project.fileTree(".") {
include("es-core/build/jacoco/test.exec", "es-kafka/build/jacoco/test.exec")
})
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.map {
fileTree(it).exclude(
"tech/figure/eventstream/stream/models/*",
"tech/figure/eventstream/stream/apis/*",
)})
)
}
reports {
xml.required.set(true)
html.required.set(true)
html.outputLocation.set(File("${buildDir}/reports/jacoco"))
csv.required.set(false)
}
}
tasks.test {
finalizedBy("jacocoTestReport")
}
val javaVersion = JavaVersion.VERSION_17
subprojects {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf("-Xjsr305=strict", "-opt-in=kotlin.RequiresOptIn", "-opt-in=kotlin.time.ExperimentalTime")
jvmTarget = "17"
}
}
tasks.withType<JavaCompile> {
sourceCompatibility = JavaVersion.VERSION_17.toString()
targetCompatibility = JavaVersion.VERSION_17.toString()
}
// Set the java version
configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
dependencies {
implementation(projects.esCore)
implementation(projects.esKafka)
}