From 0566576193d389f2fb18f029c671963f78fbfa59 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Fri, 6 Sep 2019 14:41:20 -0400 Subject: [PATCH] Upgrade dependencies --- build.gradle | 35 +++++++++++++++++------- gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 6 ++-- gradlew.bat | 2 +- publish-maven.gradle | 11 ++++++++ 5 files changed, 41 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index e7f425dd..dc21a603 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlinVersion = '1.3.31' + ext.kotlinVersion = '1.3.50' dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion" @@ -14,6 +14,7 @@ plugins { id 'org.sonarqube' version '2.7.1' id 'checkstyle' id 'org.ajoberstar.grgit' version '3.1.1' + id "io.spring.dependency-management" version "1.0.8.RELEASE" } description = 'Spring Integration Kafka Support' @@ -54,13 +55,13 @@ compileTestKotlin { } ext { - assertkVersion = '0.17' - jacksonVersion = '2.9.9' + assertkVersion = '0.19' + jacksonVersion = '2.9.9.20190807' junitJupiterVersion = '5.5.1' junitPlatformVersion = '1.5.1' - log4jVersion = '2.11.2' - springIntegrationVersion = '5.2.0.BUILD-SNAPSHOT' - springKafkaVersion = '2.3.0.BUILD-SNAPSHOT' + log4jVersion = '2.12.1' + springIntegrationVersion = '5.2.0.RC1' + springKafkaVersion = '2.3.0.RC1' idPrefix = 'kafka' @@ -75,10 +76,24 @@ ext { files(grgit.status().unstaged.modified).filter{ f -> f.name.endsWith('.java') || f.name.endsWith('.kt') } } +dependencyManagement { + resolutionStrategy { + cacheChangingModulesFor 0, 'seconds' + } + applyMavenExclusions = false + generatedPomCustomization { + enabled = false + } + imports { + mavenBom "com.fasterxml.jackson:jackson-bom:$jacksonVersion" + } +} + + eclipse.project.natures += 'org.springframework.ide.eclipse.core.springnature' jacoco { - toolVersion = "0.8.3" + toolVersion = "0.8.4" } dependencies { @@ -100,8 +115,8 @@ dependencies { // To avoid compiler warnings about @API annotations in JUnit code testCompileOnly 'org.apiguardian:apiguardian-api:1.0.0' - testRuntime "com.fasterxml.jackson.core:jackson-core:$jacksonVersion" - testRuntime "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion" + testRuntime "com.fasterxml.jackson.core:jackson-core" + testRuntime "com.fasterxml.jackson.core:jackson-databind" testRuntime "org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion" } @@ -121,7 +136,7 @@ test { checkstyle { configFile = new File(rootDir, "src/checkstyle/checkstyle.xml") - toolVersion = '8.20' + toolVersion = '8.24' } task updateCopyrights { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f4d7b2bf..7c4388a9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index b0d6d0ab..83f2acfd 100755 --- a/gradlew +++ b/gradlew @@ -7,7 +7,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -125,8 +125,8 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` diff --git a/gradlew.bat b/gradlew.bat index 15e1ee37..24467a14 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -5,7 +5,7 @@ @rem you may not use this file except in compliance with the License. @rem You may obtain a copy of the License at @rem -@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem https://www.apache.org/licenses/LICENSE-2.0 @rem @rem Unless required by applicable law or agreed to in writing, software @rem distributed under the License is distributed on an "AS IS" BASIS, diff --git a/publish-maven.gradle b/publish-maven.gradle index 69fd84e1..c9ea5de7 100644 --- a/publish-maven.gradle +++ b/publish-maven.gradle @@ -14,6 +14,17 @@ install { def customizePom(pom, gradleProject) { pom.whenConfigured { generatedPom -> + + // sort to make pom dependencies order consistent to ease comparison of older poms + generatedPom.dependencies = generatedPom.dependencies.sort { dep -> + "$dep.scope:$dep.groupId:$dep.artifactId" + } + + def managedVersions = dependencyManagement.managedVersions + generatedPom.dependencies.findAll{dep -> !dep.version }.each { dep -> + dep.version = managedVersions["${dep.groupId}:${dep.artifactId}"] + } + // respect 'optional' and 'provided' dependencies gradleProject.optionalDeps.each { dep -> generatedPom.dependencies.find { it.artifactId == dep.name }?.optional = true