Files
spring-pulsar/build.gradle
Chris Bono a52532de53 Add Jacoco code coverage violation rules (#533)
This commit adds Jacoco violation rules as well as the following:
- fails the PR workflow if rules are violated
- uploads the report if the rules are violated
- replaces JacocoConventionsPlugin (Java) with a simple groovy script

Resolves #511
2024-01-01 12:37:55 -06:00

67 lines
1.5 KiB
Groovy

plugins {
id 'io.spring.nohttp'
id 'org.springframework.pulsar.root-project'
id 'org.springframework.pulsar.update-version'
alias(libs.plugins.grgit) apply false
alias(libs.plugins.versions)
alias(libs.plugins.version.catalog.update)
}
description = 'Spring for Apache Pulsar'
apply from: 'gradle/jacoco-conventions.gradle'
apply from: 'gradle/aggregate-jacoco-report.gradle'
apply from: 'gradle/update-copyrights.gradle'
apply from: 'gradle/version-catalog-update.gradle'
allprojects {
group = 'org.springframework.pulsar'
configurations.all {
resolutionStrategy {
cacheChangingModulesFor 0, "seconds"
cacheDynamicVersionsFor 0, "seconds"
}
}
}
if (hasProperty('buildScan')) {
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
}
nohttp {
allowlistFile = project.file('src/nohttp/allowlist.lines')
source.exclude "**/bin/**"
source.exclude "**/build/**"
source.exclude "**/out/**"
source.exclude "**/target/**"
source.exclude "**/*.dylib"
source.exclude "**/*.gif"
source.exclude "**/.gradle/**"
}
check {
dependsOn checkstyleNohttp
}
tasks.register('runAllSampleTests') {
var allTasks = rootProject.getAllTasks(true)
.findAll {it.key.project.name.startsWith("sample-") }
var allTestsTasks = allTasks.values().collect { t ->
t.findAll { it.name == 'test' || it.name == 'integrationTest' }
}.flatten()
it.dependsOn {
allTestsTasks
}
}
versionCatalogUpdate {
versionCatalogs {
buildLibsCatalog {
catalogFile = file("gradle/build-libs.versions.toml")
}
}
}