Skip to content

Commit

Permalink
Forces Jackson 2.14.1 due to a dependency bug when using Gradle and t…
Browse files Browse the repository at this point in the history
…he 2.13.4.1 version FasterXML/jackson-databind#3627
  • Loading branch information
vitorpamplona committed Dec 19, 2022
1 parent 3f8e911 commit 750ce81
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
18 changes: 14 additions & 4 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,19 @@ object Dependencies {
}

object Jackson {
const val annotations = "com.fasterxml.jackson.core:jackson-annotations:${Versions.jackson}"
const val core = "com.fasterxml.jackson.core:jackson-core:${Versions.jackson}"
const val databind = "com.fasterxml.jackson.core:jackson-databind:${Versions.jackson}"
const val mainGroup = "com.fasterxml.jackson"
const val coreGroup = "$mainGroup.core"
const val dataformatGroup = "$mainGroup.dataformat"
const val datatypeGroup = "$mainGroup.datatype"
const val moduleGroup = "$mainGroup.module"

const val annotations = "$coreGroup:jackson-annotations:${Versions.jackson}"
const val bom = "$mainGroup:jackson-bom:${Versions.jackson}"
const val core = "$coreGroup:jackson-core:${Versions.jackson}"
const val databind = "$coreGroup:jackson-databind:${Versions.jackson}"
const val dataformatXml = "$dataformatGroup:jackson-dataformat-xml:${Versions.jackson}"
const val jaxbAnnotations = "$moduleGroup:jackson-module-jaxb-annotations:${Versions.jackson}"
const val jsr310 = "$datatypeGroup:jackson-datatype-jsr310:${Versions.jackson}"
}

object Kotlin {
Expand Down Expand Up @@ -202,7 +212,7 @@ object Dependencies {
const val guava = "28.2-android"
const val hapiFhir = "6.0.1"
const val http = "4.9.1"
const val jackson = "2.13.2"
const val jackson = "2.14.1"
const val jsonToolsPatch = "1.13"
const val jsonAssert = "1.5.1"
const val kotlinPoet = "1.9.0"
Expand Down
10 changes: 10 additions & 0 deletions workflow-testing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ dependencies {
compileOnly(Dependencies.Cql.translatorElm)
compileOnly(Dependencies.Cql.translatorModel)

// Forces the most recent version of jackson, ignoring what dependencies use.
// Remove these lines when HAPI 6.4 becomes available.
compileOnly(Dependencies.Jackson.annotations)
compileOnly(Dependencies.Jackson.bom)
compileOnly(Dependencies.Jackson.core)
compileOnly(Dependencies.Jackson.databind)
compileOnly(Dependencies.Jackson.dataformatXml)
compileOnly(Dependencies.Jackson.jaxbAnnotations)
compileOnly(Dependencies.Jackson.jsr310)

compileOnly(Dependencies.junit)
compileOnly(Dependencies.jsonAssert)
compileOnly(Dependencies.woodstox)
Expand Down
10 changes: 10 additions & 0 deletions workflow/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@ dependencies {
implementation(Dependencies.Cql.translatorModel) // Overrides HAPI's old versions
implementation(Dependencies.Cql.translatorModelJackson) // Necessary to import XML/JSON ModelInfos

// Forces the most recent version of jackson, ignoring what dependencies use.
// Remove these lines when HAPI 6.4 becomes available.
implementation(Dependencies.Jackson.annotations)
implementation(Dependencies.Jackson.bom)
implementation(Dependencies.Jackson.core)
implementation(Dependencies.Jackson.databind)
implementation(Dependencies.Jackson.dataformatXml)
implementation(Dependencies.Jackson.jaxbAnnotations)
implementation(Dependencies.Jackson.jsr310)

// Runtime dependency that is required to run FhirPath (also requires minSDK of 26).
// Version 3.0 uses java.lang.System.Logger, which is not available on Android
// Replace for Guava when this PR gets merged: https://github.com/hapifhir/hapi-fhir/pull/3977
Expand Down

0 comments on commit 750ce81

Please sign in to comment.