René
08/27/2025, 7:38 AMDependencyHandler#addProvider(String,Provider<Object) also support sth like DependencyHandler#addProvider(String,Provider<Collection<Object>>) We try to be good citicen using the provider api where possible but often we break at certain gradle api boundaries. E.g. we have a Provider<Collection<String>> representing a set of dependencies. what I now end up doing is mapping this explicitly to a dependencySet "early" and do
myConfiguration.defaultDependencies(t -> {
psService.get()
myDepsProvider.get()
.forEach(path -> t.add(depsHandler.project(Map.of("path", path))));
});
which feels just wrong and a misuse of defaultDependencies. Ideally I'd be able to do
dependencyHandler.addProvider("myConfiguration", myDeps.map(deps -> deps.collect(d -> dependencyHandler.project(Map.of("path", d)))))
Or do i miss something here to make that simpler?Vampire
08/27/2025, 8:49 AMconfigurations.myConfiguration {
dependencies.addAllLater(yourProviderOfIterable)
}
?Vampire
08/27/2025, 8:50 AMRené
08/27/2025, 7:47 PM