Files
spring-pulsar/spring-pulsar-sample-apps/sample-reactive/build.gradle
Chris Bono 23595e9c1c [CI] Skip samples during test target [skip ci]
This commit sets the sample tests to not run as part of the
regular 'test' task. We only want the sample tests to run during the
"check-samples" step.
2024-02-20 19:39:18 -06:00

52 lines
1.7 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'
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'
}