ysb33r
10/25/2024, 1:42 PMConfiguration instance was kept (which doesn't work with CC). The Configuration.getResolvedConfigration() method is called in the task action. Originally I went down that way as I need to both the type and classifier of the resolved transitive dependencies.
The problem now is that I cannot add a field of type ResolvedConfiguration as it will resolve within the configuration phase.
I have looked at obtaining ResolvableDependencies via Configuration.getIncoming, but I can see no way of getting instances of ResolvedArtifact out of that when the original configuration is resolved.
Any ideas?ysb33r
10/25/2024, 1:47 PMConfiguration instance.
https://gitlab.com/ysb33rOrg/simplified-jruby-gradle-plugin/-/blame/RELEASE_1_0_1/[…]/org/ysb33r/gradle/jruby/api/gems/GemUtils.groovy?ref_type=tagsMikhail Lopatkin
10/25/2024, 2:11 PMArtifactCollection, it can be stored in CC: configuration.getIncoming().getArtifacts()ysb33r
10/25/2024, 2:36 PMResolvedArtifactResult , then a ResolvedVariantResult and then finally look on the attributes for artifactType.
Not sure how to obtain the classifier though.Vampire
10/25/2024, 5:42 PMProvider<ResolvedComponentResult> as mentioned on the CC doc page.ysb33r
10/25/2024, 5:46 PMVampire
10/25/2024, 6:07 PMVampire
10/25/2024, 6:10 PMincoming.artifacts.resolvedArtifacts also mentioned there provides the informationVampire
10/25/2024, 6:13 PMysb33r
10/25/2024, 6:14 PMysb33r
10/25/2024, 6:14 PMMikhail Lopatkin
10/25/2024, 6:17 PMysb33r
10/25/2024, 6:18 PMConfiguration field into an extension on the task, then use a Provider to return what is needed. As long as the Provider then is an input on the task, it should resolve before execution occurs, but after configuration.Vampire
10/25/2024, 6:18 PMDefaultModuleComponentArtifactIdentifier and on that get name and on that classifierysb33r
10/25/2024, 6:19 PMMikhail Lopatkin
10/25/2024, 6:21 PMthen use a Provider to return what is needed.This can work, with CC the
ArtifactCollection is also likely to be computed at store time.ysb33r
10/25/2024, 10:55 PM