HHH-12799 Enforce version alignment of Mockito and ByteBuddy dependencies

This commit is contained in:
Sanne Grinovero 2018-07-12 12:32:01 +01:00
parent 5e6298d2f9
commit bb71c63853
1 changed files with 9 additions and 0 deletions

View File

@ -159,3 +159,12 @@ ext {
jboss_annotation_spec_jar : 'org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:1.0.0.Final'
]
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
//Force the "byte buddy agent" version to match the Byte Buddy version we use, as Mockito might pull in a mismatched version transitively:
if (details.requested.group + ":" + details.requested.name == 'net.bytebuddy:byte-buddy-agent') {
details.useVersion byteBuddyVersion
}
}
}