From efe0a2c0f5d49c7385ef7e24d90ce064e0d1955f Mon Sep 17 00:00:00 2001 From: Ismael Juma Date: Wed, 8 Jul 2015 12:08:27 +0100 Subject: [PATCH] kafka-2323; Simplify ScalaTest dependency versions Also remove unused `def`. --- build.gradle | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index 2b3c009..1ba9c9f 100644 --- a/build.gradle +++ b/build.gradle @@ -225,8 +225,6 @@ project(':core') { apply plugin: 'scala' archivesBaseName = "kafka_${baseScalaVersion}" - def (major, minor, trivial) = scalaVersion.tokenize('.') - dependencies { compile project(':clients') compile project(':log4j-appender') @@ -235,19 +233,19 @@ project(':core') { compile 'com.101tec:zkclient:0.5' compile 'com.yammer.metrics:metrics-core:2.2.0' compile 'net.sf.jopt-simple:jopt-simple:3.2' + if (scalaVersion.startsWith('2.11')) { + compile 'org.scala-lang.modules:scala-xml_2.11:1.0.3' + compile 'org.scala-lang.modules:scala-parser-combinators_2.11:1.0.3' + } testCompile 'junit:junit:4.6' testCompile 'org.easymock:easymock:3.0' testCompile 'org.objenesis:objenesis:1.2' - if (scalaVersion.startsWith('2.10')) { - testCompile 'org.scalatest:scalatest_2.10:1.9.1' - } else if (scalaVersion.startsWith('2.11')) { - compile 'org.scala-lang.modules:scala-xml_2.11:1.0.3' - compile 'org.scala-lang.modules:scala-parser-combinators_2.11:1.0.3' - testCompile "org.scalatest:scalatest_2.11:2.2.0" - } else { - testCompile "org.scalatest:scalatest_$scalaVersion:1.8" - } + if (scalaVersion.startsWith('2.9')) + testCompile "org.scalatest:scalatest_$scalaVersion:1.9.1" + else + testCompile "org.scalatest:scalatest_$baseScalaVersion:2.2.5" + testRuntime "$slf4jlog4j" zinc 'com.typesafe.zinc:zinc:0.3.7' -- 2.4.5