Files
spring-boot/spring-boot-project/spring-boot-data-mongodb/build.gradle
Andy Wilkinson 9ee79c1bbc Break cycle in spring-boot-data-* modules
There was a cycle in the spring-boot-data-* modules.

SpringDataWebAutoConfiguration (which sits at the spring-data-commons
level) referenced RepositoryRestMvcAutoConfiguration (which sits
at the spring-data-rest level). This dependency's expressed in the
wrong direction as data-rest depends on data-commons. The resulting
cycle was not noticable as it was expressed through a String afterName
attribute on `@AutoConfiguration`.

spring-boot-data-commons was also using spring-boot-data-jpa for its
tests, which also results in an inverted dependency relationship.

This commit reworks things so that all of the spring-boot-data-*
modules depend upon spring-boot-data-commons, mirroring the
dependency relationship in Spring Data. The integration tests in
spring-boot-data-commons have been reworked to use Spring Data
directly, avoiding the need for a circular from
spring-boot-data-commons to another spring-boot-data-* module.
2025-06-13 20:06:49 -07:00

41 lines
1.7 KiB
Groovy

plugins {
id "java-library"
id "org.springframework.boot.auto-configuration"
id "org.springframework.boot.deployed"
id "org.springframework.boot.docker-test"
id "org.springframework.boot.optional-dependencies"
}
description = "Spring Boot Data MongoDB"
dependencies {
api(project(":spring-boot-project:spring-boot"))
api(project(":spring-boot-project:spring-boot-data-commons"))
api(project(":spring-boot-project:spring-boot-mongodb"))
api("org.springframework.data:spring-data-mongodb")
compileOnly("com.fasterxml.jackson.core:jackson-annotations")
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-reactor"))
optional("org.mongodb:mongodb-driver-reactivestreams")
optional("org.mongodb:mongodb-driver-sync")
dockerTestImplementation(project(":spring-boot-project:spring-boot-test"))
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
dockerTestImplementation("ch.qos.logback:logback-classic")
dockerTestImplementation("org.junit.jupiter:junit-jupiter")
dockerTestImplementation("org.testcontainers:junit-jupiter")
dockerTestImplementation("org.testcontainers:mongodb")
testCompileOnly("com.fasterxml.jackson.core:jackson-annotations")
testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure")))
testImplementation("io.projectreactor:reactor-test")
testRuntimeOnly("ch.qos.logback:logback-classic")
}