mirror of
https://github.com/google/nomulus.git
synced 2025-07-23 19:20:44 +02:00
Fix the build due to jackson-core incompatibility (#2085)
This commit is contained in:
parent
5f5cb8df9f
commit
342051e11d
1 changed files with 21 additions and 0 deletions
|
@ -70,6 +70,27 @@ configurations {
|
|||
}
|
||||
}
|
||||
|
||||
// Custom resolution strategy to get around tricky dependency issues.
|
||||
configurations.all {
|
||||
// jackson-core is a transitive dependency that we cannot explicity specify
|
||||
// versions for, without triggering linter alerts. Even though the lockfiles
|
||||
// lock it to a lower version, Gradle will first try to resolve the
|
||||
// dependency tree based on what is available in the Maven repo before
|
||||
// applying any dependency locks. The newer version (v2.15) of jackson-core
|
||||
// results in a build failure for pre-7.6 Gradle versions during that stage.
|
||||
// This custom resolution strategy will modify the dependency tree as it was
|
||||
// being built and prevent Gradle from even trying v2.15.
|
||||
// See: https://github.com/FasterXML/jackson-core/issues/955
|
||||
// TODO: Remove the custom stragegy after we upgrade to Gradle 7.6+.
|
||||
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
|
||||
if (details.requested.group == 'com.fasterxml.jackson.core'
|
||||
&& details.requested.name == 'jackson-core'
|
||||
&& details.requested.version.startsWith('2.15')) {
|
||||
details.useVersion '2.14.2'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// compatibility with Java 8
|
||||
errorprone("com.google.errorprone:error_prone_core:2.3.4")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue