Default configuration name (artifacts) in composite build dependency


I’ve been staring at it for a while, but can’t figure it out – looking for enlightenment.

I have a composite project (“includeBuild” in settings.gradle) with a dependency on the subproject (implementation ‘’). Now, I this included ‘baz’ subproject should only extend the ‘base’ plugin (not anything fancier) and create a custom artifact that is then available in the parent build. The baz subproject has this:

plugins {
  id 'base'

group ""
version "1.0"

task createDistro(type: Copy) {
  from file("file.txt")
  into 'build/distro'
  rename { String fileName ->
    fileName.replace("file.txt", "file-subproject.txt")


artifacts {
  archives file("build/distro/file-subproject.txt")

the produced artifact is not visible in the parent build (which collects its dependencies into a folder). I’m doing something wrong here because if I change the subproject and make it a ‘java-library’ the produced JAR is visible to the parent project.

The code for this is at


 ./gradlew assemble
 ls build/dependencies

should list artifacts exposed from, but it currently doesn’t.

Any clues?

Ok, replying to myself here. The problem is that a dependency on an included build uses the default configuration and the base plugin, by default, doesn’t make the default configuration to extend the archives.


configurations {
  it.default.extendsFrom archives

fixes the problem; unless it’s still not the “right” way to do it, in which case feedback is welcome.