From 5894af6eb23439437bb5162894b9046bf0724765 Mon Sep 17 00:00:00 2001 From: John Ferguson Smart Date: Thu, 19 Feb 2015 12:11:04 +1100 Subject: [PATCH] fix: Removed dependency conflicts in the Gradle build. --- build.gradle | 18 ++++++++++++------ core/build.gradle | 19 ++++++++++++------- serenity-ant-task/build.gradle | 2 +- serenity-junit/build.gradle | 3 ++- 4 files changed, 27 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index 4f989b5330..93c2e3425b 100644 --- a/build.gradle +++ b/build.gradle @@ -24,15 +24,14 @@ allprojects { configurations.all { resolutionStrategy { // fail fast on dependency convergence problems - //failOnVersionConflict() + failOnVersionConflict() // force versions to fix dependency convergence problems // when updating this list, update Serenity's declared deps if exists // TODO make work for generated Maven POM... - // it's working for gradle build, but also had to exclude old transitives for generated POM - force 'asm:asm:3.3.1', - 'com.fasterxml.jackson.core:jackson-annotations:2.4.3', - 'com.google.code.gson:gson:2.3', + // it's working for gradle build, but also had to exclude old transitives for geio.appiumnerated POM + force 'com.fasterxml.jackson.core:jackson-annotations:2.4.3', + 'com.google.code.gson:gson:2.3.1', 'com.google.guava:guava:18.0', 'com.google.inject.extensions:guice-multibindings:3.0', 'com.google.inject.extensions:guice-servlet:3.0', @@ -44,7 +43,7 @@ allprojects { 'commons-logging:commons-logging:1.1.3', 'joda-time:joda-time:2.2', 'org.apache.commons:commons-lang3:3.3.2', - 'org.apache.httpcomponents:httpclient:4.3.4', + 'org.apache.httpcomponents:httpclient:4.4', 'org.apache.httpcomponents:httpmime:4.3.3', 'org.bouncycastle:bcprov-jdk15on:1.48', 'org.codehaus.groovy:groovy-all:2.3.6', @@ -173,7 +172,14 @@ subprojects { compile "com.google.guava:guava:18.0" compile("com.google.inject:guice:3.0") { exclude module:"asm" + exclude module:"cglib" } + + compile ('cglib:cglib:3.1') { + exclude module:"asm" + } + compile ('org.ow2.asm:asm:5.0.3') + compile "commons-codec:commons-codec:1.9" compile "org.objenesis:objenesis:2.1" compile "org.slf4j:slf4j-api:1.7.5" diff --git a/core/build.gradle b/core/build.gradle index 4ca27b6a26..96940fb7bc 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -18,12 +18,9 @@ dependencies { compile 'com.google.code.gson:gson:2.3.1' - compile ("cglib:cglib:2.2.2") { - exclude group: 'asm', module: 'asm' - } - compile "commons-codec:commons-codec:1.9" compile "commons-io:commons-io:2.4" + compile 'org.apache.httpcomponents:httpclient:4.4' compile ("com.opera:operadriver:1.5") { exclude group: 'org.seleniumhq.selenium', module:'selenium-java' @@ -39,6 +36,8 @@ dependencies { exclude group: 'commons-codec', module: 'commons-codec' exclude group: 'org.apache.commons', module: 'commons-lang3' exclude group: 'com.google.code.gson', module: 'gson' + exclude group: 'com.google.guava', module: 'guava' + exclude group: 'org.apache.httpcomponents', module: 'httpclient' } compile ('com.github.detro:phantomjsdriver:1.2.0') { @@ -46,7 +45,14 @@ dependencies { exclude group: 'org.seleniumhq.selenium', module: 'selenium-remote-driver' } - compile 'io.appium:java-client:2.1.0' + compile ('io.appium:java-client:2.1.0') { + exclude group: 'org.seleniumhq.selenium', module: 'selenium-java' + exclude group: 'org.seleniumhq.selenium', module: 'selenium-remote-driver' + exclude group: 'cglib', module: 'cglib' + exclude group: 'com.google.guava', module: 'guava' + exclude group:'org.apache.httpcomponents', module:'httpclient' + exclude group:'com.google.code.gson', module:'gson' + } compile 'org.codehaus.groovy:groovy:2.4.0' @@ -69,8 +75,6 @@ dependencies { compile ("net.sourceforge.jexcelapi:jxl:2.6.12") { exclude group: 'log4j', module: 'log4j' } - compile "asm:asm:3.3.1" - compile "org.hamcrest:hamcrest-core:1.3" compile 'org.hamcrest:hamcrest-library:1.3' compile "com.thoughtworks.xstream:xstream:1.4.1" @@ -80,6 +84,7 @@ dependencies { exclude group: 'commons-logging', module: 'commons-logging' exclude group: 'xml-apis', module: 'xml-apis' exclude group: 'commons-codec', module: 'commons-codec' + exclude group: 'org.apache.httpcomponents', module: 'httpclient' } compile "org.freemarker:freemarker:2.3.21" compile("org.fluentlenium:fluentlenium-core:0.10.2") { diff --git a/serenity-ant-task/build.gradle b/serenity-ant-task/build.gradle index f0b5c20187..fd7d5f9470 100644 --- a/serenity-ant-task/build.gradle +++ b/serenity-ant-task/build.gradle @@ -11,5 +11,5 @@ dependencies { testCompile ("org.apache.ant:ant-testutil:1.9.3"){ exclude group: "junit" } - testCompile 'org.assertj:assertj-core:1.7.0' + testCompile 'org.assertj:assertj-core:1.7.1' } \ No newline at end of file diff --git a/serenity-junit/build.gradle b/serenity-junit/build.gradle index b475870271..f86303a15c 100644 --- a/serenity-junit/build.gradle +++ b/serenity-junit/build.gradle @@ -14,7 +14,7 @@ dependencies { testCompile "org.springframework:spring-jdbc:3.2.3.RELEASE" testCompile "org.springframework:spring-aop:3.2.3.RELEASE" testCompile "org.springframework:spring-orm:3.2.3.RELEASE" - testCompile "javassist:javassist:3.12.1.GA" + testCompile "org.javassist:javassist:3.19.0-GA" testCompile "hsqldb:hsqldb:1.8.0.10" testCompile ("org.hibernate:hibernate-entitymanager:3.5.4-Final") { @@ -22,5 +22,6 @@ dependencies { exclude group: 'org.slf4j' exclude group: 'commons-collections' exclude group: 'cglib' + exclude group: 'javassist' } } \ No newline at end of file