Hello, I have a project in which I defined a dependency that has multiple artifacts. All of these artifacts are Jar files. To fetch the right artifact, I defined my dependency as follows:
dependencies {
implementation("org.example:mymodule:1.0.0") {
artifact {
name = "myArtifact"
}
}
}
The artifact is correctly fetched in my project, but if I publish the project and I try to fetch its module from another project with transitivity set to true:
dependencies {
implementation("com.mycompany:myProject:1.0.0") {
isTransitive = true
}
}
the resolution of the transitive dependency org.example:mymodule:1.0.0 fails because the artifact is not found. I could fix this issue by explicitly setting the extension of the artifact to “jar” in the dependency of my project, but I don’t understand why I have to specify the artifact’s extension to fetch it as transitive dependency whereas it is not needed with a direct dependency. What did I miss ?