Skip to content

Commit c424583

Browse files
committed
HHH-12799 Enforce version alignment of Mockito and ByteBuddy dependencies
1 parent 5b4f183 commit c424583

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

gradle/libraries.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,12 @@ ext {
159159
jboss_annotation_spec_jar : 'org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:1.0.0.Final'
160160
]
161161
}
162+
163+
configurations.all {
164+
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
165+
//Force the "byte buddy agent" version to match the Byte Buddy version we use, as Mockito might pull in a mismatched version transitively:
166+
if (details.requested.group + ":" + details.requested.name == 'net.bytebuddy:byte-buddy-agent') {
167+
details.useVersion byteBuddyVersion
168+
}
169+
}
170+
}

0 commit comments

Comments
 (0)