From 9be12ea20e87ae45191e4933de28136100da9ca2 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Thu, 15 Aug 2019 17:04:00 -0400 Subject: [PATCH] Upgrade dependencies; fix pom generation; trusty --- .travis.yml | 1 + build.gradle | 34 +++++++++++++++++----------------- publish-maven.gradle | 11 +++++++++++ 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index a176eac..db68a60 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +dist: trusty language: java jdk: oraclejdk8 install: true diff --git a/build.gradle b/build.gradle index a0ce9d2..50b6757 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,3 @@ -buildscript { - repositories { - maven { url 'https://repo.spring.io/plugins-release' } - } - dependencies { - classpath 'io.spring.gradle:dependency-management-plugin:1.0.7.RELEASE' - } -} - plugins { id 'java' id 'eclipse' @@ -15,6 +6,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 AWS Support' @@ -31,16 +23,16 @@ repositories { } ext { - assertjVersion = '3.12.2' + assertjVersion = '3.13.2' awaitilityVersion = '3.1.6' dynamodbLockClientVersion = '1.1.0' - jacksonVersion = '2.9.9' + jacksonVersion = '2.9.9.20190807' servletApiVersion = '4.0.1' - log4jVersion = '2.11.2' + log4jVersion = '2.12.1' springCloudAwsVersion = '2.2.0.BUILD-SNAPSHOT' springIntegrationVersion = '5.2.0.BUILD-SNAPSHOT' - kinesisClientVersion = '1.10.0' - kinesisProducerVersion = '0.12.11' + kinesisClientVersion = '1.11.1' + kinesisProducerVersion = '0.13.1' idPrefix = 'aws' @@ -75,25 +67,33 @@ sourceSets { apply plugin: 'io.spring.dependency-management' dependencyManagement { + resolutionStrategy { + cacheChangingModulesFor 0, 'seconds' + } + applyMavenExclusions = false + generatedPomCustomization { + enabled = false + } imports { mavenBom "org.springframework.cloud:spring-cloud-aws-dependencies:$springCloudAwsVersion" mavenBom "org.springframework.integration:spring-integration-bom:$springIntegrationVersion" + mavenBom "com.fasterxml.jackson:jackson-bom:$jacksonVersion" } } jacoco { - toolVersion = "0.8.3" + toolVersion = "0.8.4" } checkstyle { configFile = file("${rootDir}/src/checkstyle/checkstyle.xml") - toolVersion = "8.21" + toolVersion = "8.23" } dependencies { compile 'org.springframework.integration:spring-integration-core' compile 'org.springframework.cloud:spring-cloud-aws-core' - compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion" + compile 'com.fasterxml.jackson.core:jackson-databind' compile('org.springframework.cloud:spring-cloud-aws-messaging', optional) compile('org.springframework.integration:spring-integration-file', optional) diff --git a/publish-maven.gradle b/publish-maven.gradle index 8d06dfa..b83b6e4 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