Tapchicoma
05/19/2025, 2:28 PMTapchicoma
05/19/2025, 2:30 PMArtifactHandler
has only add
method which requires single artifact, while resolvable configuration may have more than one. So such approach is not working in some cases:
artifacts {
add(
outgoingConf.name,
resolvedConf.map { it.resolve().single() }
)
}
Tapchicoma
05/19/2025, 2:33 PMval resolvedConf = configurations.resolvable("resolveClasspath") {
dependencies.addLater(providers.provider {
project.dependencies.create("group:name:version")
})
}
val outgoingConf = configurations.consumable("outElements")
resolvedConf.get().incoming.afterResolve {
files.forEach {
project.artifacts.add(
outgoingConf.name,
it
)
}
}
afterEvaluate {
resolvedConf.get().resolve()
}
Tapchicoma
05/22/2025, 6:17 PMoutgoingConf.configure {
outgoing.artifacts(resolvedConf)
}