Files
messaging-library/messaging/messaging-spring-boot-starter/build.gradle
T

63 lines
3.8 KiB
Groovy

apply plugin: 'java-library'
// Scopes, not a flat list of `api`.
//
// Sixteen internal leaves were exposed as `api`, so every adopter of the starter compiled against
// the Kafka adapter, the Rabbit adapter, both JDBC reliability leaves and the admin plane whether
// they used them or not — and both brokers' `@ConditionalOnClass` guards were true at once because
// the starter itself dragged in both clients.
//
// `api` is now the types that genuinely appear in this module's public signatures; everything else
// is `implementation`. Splitting the starter into per-capability artifacts (core / kafka / rabbit /
// reliability / admin) is the structural fix the review asks for and is a registry change of its
// own; this is the part that stops an adopter's compile classpath from containing two broker SDKs.
dependencies {
// Types an adopter writes against: envelopes, destinations, publish results, profiles, ports.
api project(':messaging:messaging-core-api')
api project(':messaging:messaging-schema-api')
api project(':messaging:messaging-policy')
api project(':messaging:messaging-transport-spi')
api project(':messaging:messaging-observability')
api project(':messaging:messaging-security')
api project(':messaging:messaging-reliability-api')
// Wired by the auto-configurations and never named in an adopter's source.
implementation project(':messaging:messaging-schema-json')
implementation project(':messaging:messaging-cloudevents')
// The publisher and its collaborators live here. The starter did not depend on it at all,
// which is why MessagingCoreAutoConfiguration consumed a MessagePublisher that nothing in
// reach could produce (MSG-INT-003).
implementation project(':messaging:messaging-runtime-core')
implementation project(':messaging:messaging-kafka')
implementation project(':messaging:messaging-rabbit')
implementation project(':messaging:messaging-outbox-jdbc-postgresql')
implementation project(':messaging:messaging-inbox-jdbc-postgresql')
implementation project(':messaging:messaging-claim-check')
implementation project(':messaging:messaging-admin-api')
implementation project(':messaging:messaging-admin-runtime')
implementation 'org.springframework.boot:spring-boot-autoconfigure'
implementation 'org.springframework.boot:spring-boot-actuator'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
// The Reactor facade lives here, not in core-api: the core contract stays CompletionStage so
// that a service which does not use Reactor never inherits it. api, because
// ReactiveMessagePublisher returns Mono — a facade whose return type an adopter cannot name
// is a facade they cannot call.
api 'io.projectreactor:reactor-core'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'org.springframework:spring-test'
// Test-only, and specifically so the configuration reference can be executed rather than read:
// MessagingConfigurationBindingTest loads the YAML blocks out of the shipped document and boots
// a context on them. Spring Boot 4 treats snakeyaml as optional, so a document-driven test has
// to ask for it; production code does not, and adding it here keeps that asymmetry visible.
testImplementation 'org.yaml:snakeyaml'
// The live round trip. MSG-INT-003's membership rule is that the starter earns
// app-bootstrap membership in the same change that proves a real broker round trip,
// so the proof has to run somewhere — and the starter is where the whole platform
// assembles.
testImplementation 'org.testcontainers:testcontainers-junit-jupiter'
testImplementation 'org.testcontainers:testcontainers-kafka'
}