Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For applications built with [Spring Boot](https://spring.io/projects/spring-boot

## Getting Started

The client SDK requires Java 21 or later. Add it to your build, e.g. with Gradle:
The client SDK requires Java 21 or later. It is built against the Jackson version that the latest release of Spring Boot uses, and requires that version of Jackson or a later one. Add it to your build, e.g. with Gradle:

```kotlin
dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,26 @@ tasks.javadoc {
(options as StandardJavadocDocletOptions).addBooleanOption("Werror", true)
}

// Spring Boot decides which Jackson version Spring Boot applications use, so
// the modules build and test against the Jackson version of the Spring Boot
// release in the version catalog, instead of against one of their own. That
// way, the compiler can not pick anything a newer Jackson version adds. The
// release is pinned rather than looked up on every build, so that builds stay
// reproducible; Dependabot keeps it current. The versions of Spring Boot only
// apply where a module names no version, or a lower one, and they are not
// published.
val springBootVersions by configurations.creating {
isCanBeConsumed = false
isCanBeResolved = false
}

listOf("compileClasspath", "runtimeClasspath", "testCompileClasspath", "testRuntimeClasspath").forEach { name ->
configurations.named(name) { extendsFrom(springBootVersions) }
}

dependencies {
springBootVersions(platform(libs.findLibrary("spring-boot-dependencies").get()))

api(libs.findLibrary("jspecify").get())
errorprone(libs.findLibrary("errorprone-core").get())
errorprone(libs.findLibrary("nullaway").get())
Expand Down Expand Up @@ -113,6 +132,18 @@ spotless {
}
}

// Publishes the versions the modules were built and tested against, e.g. the
// Jackson version that Spring Boot gives them.
publishing {
publications.withType<MavenPublication>().configureEach {
versionMapping {
allVariants {
fromResolutionResult()
}
}
}
}

mavenPublishing {
publishToMavenCentral()

Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
assertj = "3.27.7"
errorprone = "2.50.0"
errorprone-gradle-plugin = "5.1.1"
jackson = "3.2.3"
jspecify = "1.0.1"
jacoco = "0.8.15"
junit = "6.1.3"
Expand All @@ -18,7 +17,7 @@ testcontainers = "2.0.5"
assertj-core = { module = "org.assertj:assertj-core", version.ref = "assertj" }
errorprone-core = { module = "com.google.errorprone:error_prone_core", version.ref = "errorprone" }
errorprone-gradle-plugin = { module = "net.ltgt.gradle:gradle-errorprone-plugin", version.ref = "errorprone-gradle-plugin" }
jackson-databind = { module = "tools.jackson.core:jackson-databind", version.ref = "jackson" }
jackson-databind = { module = "tools.jackson.core:jackson-databind" }
jspecify = { module = "org.jspecify:jspecify", version.ref = "jspecify" }
jacoco-agent = { module = "org.jacoco:org.jacoco.agent", version.ref = "jacoco" }
junit-bom = { module = "org.junit:junit-bom", version.ref = "junit" }
Expand All @@ -27,6 +26,7 @@ maven-publish-gradle-plugin = { module = "com.vanniktech:gradle-maven-publish-pl
palantir-java-format = { module = "com.palantir.javaformat:palantir-java-format", version.ref = "palantir-java-format" }
slf4j-nop = { module = "org.slf4j:slf4j-nop", version.ref = "slf4j" }
spotless-gradle-plugin = { module = "com.diffplug.spotless:spotless-plugin-gradle", version.ref = "spotless" }
spring-boot-dependencies = { module = "org.springframework.boot:spring-boot-dependencies", version.ref = "spring-boot" }
spring-boot-configuration-processor = { module = "org.springframework.boot:spring-boot-configuration-processor", version.ref = "spring-boot" }
spring-boot-jackson = { module = "org.springframework.boot:spring-boot-jackson", version.ref = "spring-boot" }
spring-boot-starter = { module = "org.springframework.boot:spring-boot-starter", version.ref = "spring-boot" }
Expand Down
Loading