Slackbot
12/10/2023, 12:05 PMAdam
12/10/2023, 12:31 PMAdam
12/10/2023, 12:32 PMextendsFrom(configurations.implementation.get())Thomas Broyer
12/10/2023, 12:33 PMI am struggling to get expected result when "configurations" belong to different Gradle's sub-projectsYou shouldn't reach to other projects' configurations directly. See https://docs.gradle.org/current/userguide/cross_project_publications.html (as you probably want those projects' output too, but variants should work even without output I believe)
Adam
12/10/2023, 12:34 PMKirill Gavrilov
12/10/2023, 2:39 PMproject() is not enough (and not recommended) here and that the only right way to do it is through "variants".
@Adam your long SO post additionally helped me to finally wrap my head around "variants" concept. Thank you! Btw I am aware of "test suites", but here I indeed need a different sub-project, because those tests are another deployment unit.
Finally, to solve my problem it was enough to just follow the "Simple sharing of artifacts between projects" section of Gradle docs. I just created a pair of configurations on provider and consumer side, where I just extendFrom what I need on provider side. That gave me a safe and idiomatic exchange between sub-projects. Cool!