From cdaa2edfd885f4f09864116dcdc1bab488c3e3e4 Mon Sep 17 00:00:00 2001 From: Emil Lundberg Date: Wed, 3 May 2023 15:05:41 +0200 Subject: [PATCH] Re-introduce version constraints on individual Jackson modules --- build.gradle | 3 ++- settings.gradle.kts | 17 ++++++++++++++--- webauthn-server-attestation/build.gradle.kts | 1 - webauthn-server-core/build.gradle.kts | 1 - yubico-util/build.gradle.kts | 1 - 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index e52ed110d..96d7be6eb 100644 --- a/build.gradle +++ b/build.gradle @@ -32,9 +32,10 @@ wrapper { dependencies { constraints { + api(constraintLibs.bundles.jackson) + api(constraintLibs.cbor) api(constraintLibs.cose) api(constraintLibs.guava) - api(constraintLibs.cbor) api(constraintLibs.httpclient5) api(constraintLibs.slf4j) } diff --git a/settings.gradle.kts b/settings.gradle.kts index e236a5d9c..4c4394666 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -14,14 +14,25 @@ include(":test-platform") dependencyResolutionManagement { versionCatalogs { create("constraintLibs") { - val jacksonVer = version("jackson", "[2.13.2.1,3)") - library("cbor", "com.upokecenter:cbor:[4.5.1,5)") library("cose", "com.augustcellars.cose:cose-java:[1.0.0,2)") library("guava", "com.google.guava:guava:[24.1.1,32)") library("httpclient5", "org.apache.httpcomponents.client5:httpclient5:[5.0.0,6)") - library("jackson-bom", "com.fasterxml.jackson", "jackson-bom").versionRef(jacksonVer) library("slf4j", "org.slf4j:slf4j-api:[1.7.25,3)") + + val jacksonVer = version("jackson", "[2.13.2.1,3)") + library("jackson-bom", "com.fasterxml.jackson", "jackson-bom").versionRef(jacksonVer) + library("jackson-databind", "com.fasterxml.jackson.core", "jackson-databind").versionRef(jacksonVer) + library("jackson-dataformat-cbor", "com.fasterxml.jackson.dataformat", "jackson-dataformat-cbor").versionRef(jacksonVer) + library("jackson-datatype-jdk8", "com.fasterxml.jackson.datatype", "jackson-datatype-jdk8").versionRef(jacksonVer) + library("jackson-datatype-jsr310", "com.fasterxml.jackson.datatype", "jackson-datatype-jsr310").versionRef(jacksonVer) + bundle("jackson", listOf( + "jackson-bom", + "jackson-databind", + "jackson-dataformat-cbor", + "jackson-datatype-jdk8", + "jackson-datatype-jsr310", + )) } } } diff --git a/webauthn-server-attestation/build.gradle.kts b/webauthn-server-attestation/build.gradle.kts index 3ef10a836..fdcbb8e4c 100644 --- a/webauthn-server-attestation/build.gradle.kts +++ b/webauthn-server-attestation/build.gradle.kts @@ -30,7 +30,6 @@ dependencies { api(project(":webauthn-server-core")) - implementation(platform(constraintLibs.jackson.bom)) implementation(project(":yubico-util")) implementation("com.fasterxml.jackson.core:jackson-databind") implementation("org.slf4j:slf4j-api") diff --git a/webauthn-server-core/build.gradle.kts b/webauthn-server-core/build.gradle.kts index 03f1e133a..69cf488b8 100644 --- a/webauthn-server-core/build.gradle.kts +++ b/webauthn-server-core/build.gradle.kts @@ -15,7 +15,6 @@ description = "Yubico WebAuthn server core API" dependencies { api(platform(rootProject)) - implementation(platform(constraintLibs.jackson.bom)) implementation(project(":yubico-util")) implementation("com.augustcellars.cose:cose-java") implementation("com.fasterxml.jackson.core:jackson-databind") diff --git a/yubico-util/build.gradle.kts b/yubico-util/build.gradle.kts index 9354e7712..c5849fdfa 100644 --- a/yubico-util/build.gradle.kts +++ b/yubico-util/build.gradle.kts @@ -16,7 +16,6 @@ dependencies { api(platform(rootProject)) api("com.fasterxml.jackson.core:jackson-databind") - api(platform(constraintLibs.jackson.bom)) implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor") implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8")