This message was deleted.
# dependency-management
s
This message was deleted.
of course my plugin needs to support older Gradle versions, but if there's a way to make it work properly in 7.4...
v
I mean to remember the same, yes
m
since I'm not seeing anything related in the release notes I'm wondering
v
I think this is the relevant section https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:requirements?
Referencing dependency resolution results is also disallowed (e.g.
ArtifactResolutionQuery
,
ResolvedArtifact
,
ArtifactResult
etc…​). For example, if you reference some
ResolvedComponentResult
instances, you should instead declare a
Provider<ResolvedComponentResult>
as an input to your task. Such a provider can be obtained by invoking
ResolutionResult.getRootComponent()
. In the same vein, if you reference some
ResolvedArtifactResult
instances, you should instead use
ArtifactCollection.getResolvedArtifacts()
that returns a
Provider<Set<ResolvedArtifactResult>>
that can be mapped as an input to your task. The rule of thumb is that tasks must not reference resolved results, but lazy specifications instead, in order to do the dependency resolution at execution time.
Here a demo project how to use it in configuration cache compatible way: https://github.com/adammurdoch/dependency-graph-as-task-inputs
m
Thanks, let me take a look!
ah dang, it's a new method which returns a `Provider`:
getResolvedArtifacts()
. Makes it harder to upgrade.
I should be able to deal with that, will take a bit longer :)
j
Looks like this is not mentioned in the release notes or in any GH issue linked to the release. I was confused as well. But that’s it. https://gradle-community.slack.com/archives/C013WEPGQF9/p1643792700540709
👍 1
Anyway, it’s great that this is now possible.
v
Yes, that's where I copied the link from 🙂
l
It is not in release notes as it still has rough edges that need polishing before making it (more) public. 7.5 should announce it 😉
👍 4