Composite build and Ivy Repositories

Hi,

Should the case below of Composite Builds and Ivy repositories work?

I have project core which declares a custom Ivy Repository like this:

core build.gradle

repositories {
  jcenter()
  ivy {
    // https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin
    url 'https://dl.fbaipublicfiles.com'
    patternLayout {
      artifact '/[organization]/supervised-models/[module].[revision].[ext]'
    }
    metadataSources { artifact() }
  }
}


dependencies {
    implementation "fasttext:lid:176@bin"
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
}

The core project is declared as a dependency in the api project and api project is also including with includeBuild.

api build.gradle

dependencies {
    implementation 'com.example:core:1.0'
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
}

api settings.gradle

rootProject.name = 'api'

includeBuild('../core')

When I build core it properly builds and downloads the Ivy dependency (FastText lid) however when I build api it give an error that it couldn’t found the Fast Text lid dependency but it only looks in the api project repositories.

Error snippet:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':distTar'.
> Could not resolve all task dependencies for configuration ':runtimeClasspath'.
   > Could not find fasttext:lid:176.
     Searched in the following locations:
       - https://jcenter.bintray.com/fasttext/lid/176/lid-176.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > project :core

If this is a work as intended behaviour in gradle there is a way to overcome it without configure the Ivy repository from core in the api project?

The example showing this case is published here:

Thanks in advance.