KAFKA-3286: Add plugin to quickly check for outdated dependencies

Adds a gradle task to generate a report of outdate release dependencies:
`gradle dependencyUpdates`

Updates a few minor versions.

Author: Grant Henke <granthenke@gmail.com>

Reviewers: Ismael Juma, Gwen Shapira

Closes #973 from granthenke/outdated-deps
This commit is contained in:
Grant Henke 2016-03-03 15:10:16 -08:00 committed by Gwen Shapira
parent 7079f57f70
commit f25fe02d99
3 changed files with 26 additions and 3 deletions

View File

@ -114,6 +114,9 @@ Please note for this to work you should create/update `~/.gradle/gradle.properti
### Determining how transitive dependencies are added ###
./gradlew core:dependencies --configuration runtime
### Determining if any dependencies could be updated ###
./gradlew dependencyUpdates
### Running checkstyle on the java code ###
./gradlew checkstyleMain checkstyleTest

View File

@ -18,12 +18,14 @@ import org.ajoberstar.grgit.Grgit
buildscript {
repositories {
mavenCentral()
jcenter()
}
apply from: file('gradle/buildscript.gradle'), to: buildscript
dependencies {
// For Apache Rat plugin to ignore non-Git files
classpath "org.ajoberstar:grgit:1.5.0"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
}
}
@ -33,6 +35,24 @@ allprojects {
repositories {
mavenCentral()
}
apply plugin: 'com.github.ben-manes.versions'
dependencyUpdates {
revision="release"
resolutionStrategy = {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['snap', 'alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
}
}
}
ext {

View File

@ -28,8 +28,8 @@ versions += [
hadoop: "2.7.2",
easymock: "3.4",
jackson: "2.6.3",
jetty: "9.2.14.v20151106",
jersey: "2.22.1",
jetty: "9.2.15.v20160210",
jersey: "2.22.2",
jopt: "4.9",
junit: "4.12",
lz4: "1.3.0",
@ -39,7 +39,7 @@ versions += [
rocksDB: "4.1.0",
scalaTest: "2.2.6",
scalaParserCombinators: "1.0.4",
slf4j: "1.7.15",
slf4j: "1.7.18",
snappy: "1.1.2.1",
zkclient: "0.7",
zookeeper: "3.4.6",