Adds the ability to specify the Pulsar client version when running the samples apps. Uses this new capability to add entries to the check-samples.yml compatability test matrix to include Pulsar 4.0.x. See #923
51 lines
1.5 KiB
Groovy
51 lines
1.5 KiB
Groovy
plugins {
|
|
id 'java'
|
|
alias(libs.plugins.spring.boot)
|
|
alias(libs.plugins.spring.dep.mgmt)
|
|
}
|
|
|
|
description = 'Spring Pulsar Sample Application (Reader)'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url 'https://repo.spring.io/milestone' }
|
|
maven { url 'https://repo.spring.io/snapshot' }
|
|
}
|
|
|
|
def versionCatalog = extensions.getByType(VersionCatalogsExtension).named("libs")
|
|
def pulsarVersion = project.properties['pulsarVersion'] ?: versionCatalog.findVersion("pulsar").orElseThrow().displayName
|
|
|
|
ext['spring-pulsar.version'] = "${project.property('version.samples')}"
|
|
ext['pulsar.version'] = "${pulsarVersion}"
|
|
|
|
|
|
dependencies {
|
|
implementation 'org.springframework.boot:spring-boot-starter-pulsar'
|
|
developmentOnly 'org.springframework.boot:spring-boot-docker-compose'
|
|
testImplementation project(':spring-pulsar-test')
|
|
testRuntimeOnly 'ch.qos.logback:logback-classic'
|
|
testImplementation "org.springframework.boot:spring-boot-starter-test"
|
|
testImplementation "org.springframework.boot:spring-boot-testcontainers"
|
|
testImplementation 'org.testcontainers:junit-jupiter'
|
|
testImplementation 'org.testcontainers:pulsar'
|
|
}
|
|
|
|
test {
|
|
onlyIf {
|
|
project.hasProperty("sampleTests")
|
|
}
|
|
useJUnitPlatform()
|
|
testLogging.showStandardStreams = true
|
|
outputs.upToDateWhen { false }
|
|
}
|
|
|
|
bootRun {
|
|
jvmArgs = [
|
|
"--add-opens", "java.base/java.lang=ALL-UNNAMED",
|
|
"--add-opens", "java.base/java.util=ALL-UNNAMED",
|
|
"--add-opens", "java.base/sun.net=ALL-UNNAMED"
|
|
]
|
|
// when run from command line, path must be set relative to module dir
|
|
systemProperty 'spring.docker.compose.file', 'compose.yaml'
|
|
}
|