Slackbot
10/16/2023, 3:34 AMThomas Broyer
10/16/2023, 7:18 AMbucketClasspath from consumer to get the bucketClasspath from producer you need to declare attributes on the configurations so that Gradle picks the appropriate variant, otherwise it will take the default one, which likely will be runtimeElements .
https://docs.gradle.org/current/userguide/variant_model.htmlJendrik Johannes
10/16/2023, 3:48 PMtony
10/16/2023, 6:16 PMCristianGM
10/16/2023, 7:10 PM:producer:runtimeElements
I believe everything works as expectedCristianGM
10/16/2023, 7:11 PMdependencies {
bucket(project(path = ":producer", configuration = "bucket"))
}tony
10/16/2023, 7:15 PMtony
10/16/2023, 7:16 PMbucket configuration has no relationship to existing configurationsCristianGM
10/16/2023, 7:16 PMtony
10/16/2023, 7:16 PMtony
10/16/2023, 7:16 PMCristianGM
10/16/2023, 7:17 PMdefaulttony
10/16/2023, 7:18 PMCristianGM
10/16/2023, 7:18 PMCristianGM
10/16/2023, 7:19 PMtony
10/16/2023, 7:19 PMtony
10/16/2023, 7:20 PMoutgoingVariants and resolvableConfigurations but I didn't see this. I could have just missed it; there's a lot of output to those tasksCristianGM
10/16/2023, 8:03 PMThomas Broyer
10/17/2023, 8:24 AMThomas Broyer
10/17/2023, 8:29 AMThomas Broyer
10/17/2023, 8:36 AM./gradlew :consumer:dependencyInsight --configuration bucketElements --dependency :producertony
10/17/2023, 4:48 PM// consumer/build.gradle
dependencies {
bucket project(':producer')
}
there's no obvious reason to me, looking at that, why it would ever get runtimeElements from :producer. The consumable configuration associated with the bucket configuration doesn't have any artifacts associated with it. In fact, I'm not actually sure how gradle gets from the dependency scope (bucket) to the consumable configuration (bucketElements.extendsFrom(bucket))