From 3d68806ca1397abd5cba972028dd392a84c5df2a Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Fri, 19 Aug 2016 12:28:41 -0500 Subject: [PATCH] Consistent reactor-core versions Previously the IDE (STS) was resolving a different reactor-core version (3.0.0.BUILD-SNAPSHOT) than the build (3.0.0.RELEASE). This discrepancy was due to the fact that reactor-netty now brings in reactor-core 3.0.0.RELEASE. Gradle's version conflict resolution is to use the latest version. However, the optional dependency on reactor-core 3.0.0.BUILD-SNAPSHOT was making the build path of the IDE use the SNAPSHOT. This fix leverages a resolutionStrategy to ensure a consistent version of reactor-core is used throughout the entire project. It also bumps up the reactor-core version to 3.0.0.RELEASE to be consistent with reactor-netty. Care is taken to only change 3.x vesion since 2.x is still used within the codebase. --- build.gradle | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index fd474b8b829..4730a62decd 100644 --- a/build.gradle +++ b/build.gradle @@ -74,7 +74,7 @@ configure(allprojects) { project -> ext.protobufVersion = "3.0.0" ext.reactivestreamsVersion = "1.0.0" ext.reactorVersion = "2.0.8.RELEASE" - ext.reactorCoreVersion = '3.0.0.BUILD-SNAPSHOT' + ext.reactorCoreVersion = '3.0.0.RELEASE' ext.reactorNettyVersion = '0.5.0.BUILD-SNAPSHOT' ext.romeVersion = "1.6.0" ext.rxjavaVersion = '1.1.9' @@ -116,6 +116,11 @@ configure(allprojects) { project -> details.useVersion nettyVersion } } + resolutionStrategy.eachDependency { DependencyResolveDetails details -> + if (details.requested.name == 'reactor-core' && details.requested.version.startsWith('3.')) { + details.useVersion reactorCoreVersion + } + } } compileJava.options.encoding = 'UTF-8'