I think this is an upstream issue: configuration.incoming.resolutionResult.rootComponent is a Provider but although we add a mapper during configuration phase, with stable configuration cache using Gradle 8.1 the mapper is called during execution, breaking configuration cache. Previous versions of Gradle called the mapper during configuration phase.
Solution: I extract the usage of dependencies and configurations into variables called during configuration phase.
I couldn't update Gradle to 8.1 because KGP does not support this version.
I test it locally with failed tests due to missing KGP support.
I think this is an upstream issue:
configuration.incoming.resolutionResult.rootComponent
is aProvider
but although we add a mapper during configuration phase, with stable configuration cache using Gradle 8.1 the mapper is called during execution, breaking configuration cache. Previous versions of Gradle called the mapper during configuration phase.Solution: I extract the usage of
dependencies
andconfigurations
into variables called during configuration phase.I couldn't update Gradle to 8.1 because KGP does not support this version. I test it locally with failed tests due to missing KGP support.