[build] Aggregated coverage report
This commit is contained in:
@@ -1,7 +1,27 @@
|
||||
plugins {
|
||||
id("java")
|
||||
id("maven-publish")
|
||||
`jacoco-report-aggregation`
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
group = "de.siphalor.tweed5"
|
||||
version = properties["version"]!!
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
rootProject.subprojects.forEach { subproject ->
|
||||
subproject.plugins.withId("jacoco") {
|
||||
jacocoAggregation(project(subproject.path))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
reporting {
|
||||
reports {
|
||||
val aggregatedCoverageReport by creating(JacocoCoverageReport::class) {
|
||||
testSuiteName = "test"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
java
|
||||
`java-library`
|
||||
jacoco
|
||||
`maven-publish`
|
||||
alias(libs.plugins.lombok)
|
||||
id("de.siphalor.tweed5.local-runtime-only")
|
||||
@@ -61,6 +62,7 @@ tasks.compileTestJava {
|
||||
|
||||
tasks.test {
|
||||
dependsOn(testAgentClasspath)
|
||||
finalizedBy(tasks.jacocoTestReport)
|
||||
|
||||
useJUnitPlatform()
|
||||
jvmArgs(testAgentClasspath.get().files.map { file -> "-javaagent:${file.absolutePath}" })
|
||||
@@ -71,6 +73,10 @@ tasks.test {
|
||||
)
|
||||
}
|
||||
|
||||
tasks.jacocoTestReport {
|
||||
dependsOn(tasks.test)
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("lib") {
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
import gradle.kotlin.dsl.accessors._182d53d78a136df48d95cf7411f9259f.lombok
|
||||
import org.gradle.kotlin.dsl.assign
|
||||
|
||||
plugins {
|
||||
java
|
||||
alias(libs.plugins.lombok)
|
||||
|
||||
Reference in New Issue
Block a user