From b3b2c9e3f91b669ae2975a40ccac6a0ec43961c2 Mon Sep 17 00:00:00 2001 From: j-sandy Date: Mon, 17 Jan 2022 16:02:35 +0000 Subject: [PATCH] fix(dependency): Introducing spring dependency management gradle plugin Spring boot has moved to gradle based dependency management from v2.3.x. This change has brought issue of conflict resolution failure of the Jackson-bom version and kotlin-bom version with gate service when it consumes the maven-bom generated by kork. The issue details are available in given link. https://docs.google.com/document/d/1Ck4KeoB1ER0aQUTnf3e-x-M3i2Ur0It7YaaxEMiMXls/edit To resolve this issue while upgrading gate service with spring v2.3.x, we must require the spring dependency management gradle plugin. --- build.gradle | 8 ++++++++ gradle.properties | 1 + 2 files changed, 9 insertions(+) diff --git a/build.gradle b/build.gradle index d4fff56277..7cceddc973 100644 --- a/build.gradle +++ b/build.gradle @@ -3,10 +3,12 @@ plugins { id "org.jetbrains.kotlin.jvm" version "$kotlinVersion" apply false id "org.jetbrains.kotlin.plugin.allopen" version "$kotlinVersion" apply false id "org.jetbrains.dokka" version "0.10.1" apply false + id "io.spring.dependency-management" version "$springDependencyPluginVersion" } allprojects { apply plugin: 'io.spinnaker.project' + apply plugin: "io.spring.dependency-management" group = "io.spinnaker.gate" @@ -46,6 +48,12 @@ allprojects { testRuntimeOnly "org.objenesis:objenesis" } + dependencyManagement { + imports { + mavenBom "io.spinnaker.kork:kork-bom:$korkVersion" + } + } + configurations.all { exclude group: 'javax.servlet', module: 'servlet-api' exclude group: 'javax.servlet', module: 'javax.servlet-api' diff --git a/gradle.properties b/gradle.properties index 900e270ae8..e417a4dc68 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,6 +5,7 @@ korkVersion=7.131.0 kotlinVersion=1.4.0 org.gradle.parallel=true spinnakerGradleVersion=8.16.0 +springDependencyPluginVersion=1.0.11.RELEASE targetJava11=true # To enable a composite reference to a project, set the