and that project produces several jar artefacts (that by default, end up being part of the archives configuration). Is there a way to select a subset of jars from that project only.
I know it sounds daft why I’d want to do this but just trust me on this
In case it helps anyone, this is what I ended up with on the producer side:
tasks.add(name: "${client.name}Jar", type: Jar) { thisTask ->
baseName = client.name
configurations.add(client.name as String)
artifacts.add(client.name as String, thisTask)
}
edit: added the task’s output as an artifact instead so that the consumer triggers the build of this configuration as clearly pointed out in the documentation “Project lib dependencies”.