Skip to content

Commit

Permalink
fix(gradle): Also check for non-empty resolution alternatives
Browse files Browse the repository at this point in the history
Starting with Gradle 8.2, a property that defines if a
Gradle configuration is deprecated can be an empty
list instead of just null. This is misinterpreted by the
Gradle analyzer plugin, and all Gradle configurations
are considered deprecated. As a result, no dependencies
for Gradle configurations are returned.

Fixes #9255.

Signed-off-by: Wolfgang Klenk <wolfgang.klenk2@bosch.com>
  • Loading branch information
wkl3nk authored and sschuberth committed Oct 9, 2024
1 parent 6a8a46c commit bca9748
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ class AbstractOrtDependencyTreePlugin<T> implements Plugin<T> {
// available since Gradle 6.0.
boolean isDeprecatedForResolving = false
if (configuration.metaClass.respondsTo(configuration, 'getResolutionAlternatives')) {
isDeprecatedForResolving = configuration.getResolutionAlternatives() != null
isDeprecatedForResolving = configuration.getResolutionAlternatives()
}

return canBeResolved && !isDeprecatedForResolving
Expand Down

0 comments on commit bca9748

Please sign in to comment.