Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,14 @@ val buildToolIntegrationMaven by
commandLine("./mvnw", "clean", "package", "-Dcel.version=${project.version}")
}

val buildToolIntegrations by
tasks.registering {
group = "Verification"
description =
"Checks whether bom works fine with build tools, requires preceding publishToMavenLocal in a separate Gradle invocation"
val buildToolIntegrations by tasks.registering {
group = "Verification"
description =
"Checks whether bom works fine with build tools, requires preceding publishToMavenLocal in a separate Gradle invocation"

dependsOn(buildToolIntegrationGradle)
dependsOn(buildToolIntegrationMaven)
}
dependsOn(buildToolIntegrationGradle)
dependsOn(buildToolIntegrationMaven)
}

publishingHelper {
nessieRepoName.set("cel-java")
Expand Down
39 changes: 19 additions & 20 deletions buildSrc/src/main/kotlin/CodeCoverage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,31 @@ import org.gradle.testing.jacoco.plugins.JacocoTaskExtension
import org.gradle.testing.jacoco.tasks.JacocoReport

class CelCodeCoveragePlugin : Plugin<Project> {
override fun apply(project: Project): Unit =
project.run {
apply<JacocoPlugin>()
apply<JacocoReportAggregationPlugin>()
override fun apply(project: Project): Unit = project.run {
apply<JacocoPlugin>()
apply<JacocoReportAggregationPlugin>()

tasks.withType<JacocoReport>().configureEach {
reports {
html.required.set(true)
xml.required.set(true)
}
tasks.withType<JacocoReport>().configureEach {
reports {
html.required.set(true)
xml.required.set(true)
}
}

configure<JacocoPluginExtension> { toolVersion = libsRequiredVersion("jacoco") }
configure<JacocoPluginExtension> { toolVersion = libsRequiredVersion("jacoco") }

if (plugins.hasPlugin("io.quarkus")) {
tasks.named("classes") { dependsOn(tasks.named("compileQuarkusGeneratedSourcesJava")) }
if (plugins.hasPlugin("io.quarkus")) {
tasks.named("classes") { dependsOn(tasks.named("compileQuarkusGeneratedSourcesJava")) }

tasks.withType<Test>().configureEach {
extensions.configure(JacocoTaskExtension::class.java) {
val excluded = excludeClassLoaders
excludeClassLoaders =
listOf("*QuarkusClassLoader") + (if (excluded != null) excluded else emptyList())
}
systemProperty("quarkus.jacoco.report", "false")
systemProperty("quarkus.jacoco.reuse-data-file", "true")
tasks.withType<Test>().configureEach {
extensions.configure(JacocoTaskExtension::class.java) {
val excluded = excludeClassLoaders
excludeClassLoaders =
listOf("*QuarkusClassLoader") + (if (excluded != null) excluded else emptyList())
}
systemProperty("quarkus.jacoco.report", "false")
systemProperty("quarkus.jacoco.reuse-data-file", "true")
}
}
}
}
11 changes: 5 additions & 6 deletions buildSrc/src/main/kotlin/ProtobufHelperPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ import org.gradle.kotlin.dsl.withType
/** Makes the generated sources available to IDEs, disables Checkstyle on generated code. */
@Suppress("unused")
class ProtobufHelperPlugin : Plugin<Project> {
override fun apply(project: Project): Unit =
project.run {
apply<ProtobufPlugin>()
override fun apply(project: Project): Unit = project.run {
apply<ProtobufPlugin>()

tasks.withType(ProtobufExtract::class.java).configureEach {
dependsOn(tasks.named("processJandexIndex"))
}
tasks.withType(ProtobufExtract::class.java).configureEach {
dependsOn(tasks.named("processJandexIndex"))
}
}
}
Loading