Files
spring-pulsar/spring-pulsar-sample-apps/sample-reactive/build.gradle
Chris Bono 70e9e60f39 Allow custom object mapper for messages (#755)
This commit adds support for a user-provided Jackson ObjectMapper to be
used when de/serializing JSON messages.

Additionally, adds Gradle test fixtures to the spring-pulsar module and
deprecates the UserRecord and UserPojo in spring-pulsar-test in favor
of their equivalent in the test fixture.

See #723
2024-07-29 21:57:27 -05:00

55 lines
1.8 KiB
Groovy

plugins {
id 'java'
alias(libs.plugins.spring.boot)
alias(libs.plugins.spring.dep.mgmt)
}
description = 'Reactive Spring Pulsar Sample Application'
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 = versionCatalog.findVersion("pulsar").orElseThrow().displayName
def pulsarReactiveVersion = versionCatalog.findVersion("pulsar-reactive").orElseThrow().displayName
ext['spring-pulsar.version'] = "${project.property('version.samples')}"
ext['pulsar.version'] = "${pulsarVersion}"
ext['pulsar-reactive.version'] = "${pulsarReactiveVersion}"
dependencies {
implementation "org.springframework.boot:spring-boot-starter-pulsar-reactive"
developmentOnly 'org.springframework.boot:spring-boot-docker-compose'
// temporary until JsonSchemaUtil published
implementation project(':spring-pulsar')
implementation(testFixtures(project(":spring-pulsar")))
implementation 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'
}