Skip to content

Commit 3d68806

Browse files
author
Rob Winch
committed
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.
1 parent b183934 commit 3d68806

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ configure(allprojects) { project ->
7474
ext.protobufVersion = "3.0.0"
7575
ext.reactivestreamsVersion = "1.0.0"
7676
ext.reactorVersion = "2.0.8.RELEASE"
77-
ext.reactorCoreVersion = '3.0.0.BUILD-SNAPSHOT'
77+
ext.reactorCoreVersion = '3.0.0.RELEASE'
7878
ext.reactorNettyVersion = '0.5.0.BUILD-SNAPSHOT'
7979
ext.romeVersion = "1.6.0"
8080
ext.rxjavaVersion = '1.1.9'
@@ -116,6 +116,11 @@ configure(allprojects) { project ->
116116
details.useVersion nettyVersion
117117
}
118118
}
119+
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
120+
if (details.requested.name == 'reactor-core' && details.requested.version.startsWith('3.')) {
121+
details.useVersion reactorCoreVersion
122+
}
123+
}
119124
}
120125

121126
compileJava.options.encoding = 'UTF-8'

0 commit comments

Comments
 (0)