all: Keep artifacts dependencyConvergence-clean
Maven Enforcer's dependencyConvergence is commonly used in Spring
projects, as it is inherited by all starter projects[1]. While I find
that option to be crazy and harmful (and would instead support
requireUpperBoundDeps), it does bother people.
1. https://github.com/spring-projects/spring-boot/blob/v1.5.6.RELEASE/spring-boot-starters/pom.xml#L94
diff --git a/build.gradle b/build.gradle
index c1f5c9d..d7db6eb 100644
--- a/build.gradle
+++ b/build.gradle
@@ -221,11 +221,20 @@
// Define a separate configuration for managing the dependency on Jetty ALPN agent.
configurations {
alpnagent
+
+ compile {
+ // Detect Maven Enforcer's dependencyConvergence failures. We only
+ // care for artifacts used as libraries by others.
+ if (!(project.name in ['grpc-benchmarks', 'grpc-interop-testing'])) {
+ resolutionStrategy.failOnVersionConflict()
+ }
+ }
}
dependencies {
testCompile libraries.junit,
- libraries.mockito
+ libraries.mockito,
+ libraries.truth
// Configuration for modules that use Jetty ALPN agent
alpnagent libraries.jetty_alpn_agent