• Andy Wilkinson's avatar
    Ignore resolution of copied configuration · 409e3cce
    Andy Wilkinson authored
    When a Configuration is copied, any before and after resolve actions
    that are registered with its ResolvableDependencies are also copied
    over. This means that, when a copied configuration is resolved the
    resolution actions may be called on a ResolvableDependencies instances
    that isn't the one to which they were added.
    
    Previously, the above-described Gradle behaviour would result in
    BootJar accessed the ResolvedConfiguration of a Configuration that may
    not have yet been resolved. At best this would trigger Configuration
    resolution and at worst it would fail. A failure could occur if the
    configuration had been copied so that it could be made resolvable.
    The afterResolve action would then try to access the
    ResolvedConfiguration of the original Configuration. This would trigger
    a resolution attempt that fails due to the original configuration being
    marked as unresolvable.
    
    This commit updates the afterResolve action in BootJar to check that
    the ResolvableDependencies with which it is called matches the
    ResolvableDependencies with which it was original registered. Only
    when the two match, and therefore the configuration has actually been
    resolved, does processing proceed.
    
    Fixes gh-24072
    409e3cce
Name
Last commit
Last update
..
org/springframework/boot/gradle Loading commit data...
repository Loading commit data...