This message was deleted.
# community-support
s
This message was deleted.
t
Does project A also correctly publishes Gradle module metadata for both modules? And does project B resolves module metadata? (iirc, should be visible in debug logs) If you only publish POMs, or if project B only resolves POMs, then you lose the variants information.
v
Can you maybe knit an MCVE that shows your problem? Might be easier to understand and properly advise then.
f
I'll try to get an MCVE going. @Thomas Broyer I am publishing metadata, yes (artifactory does have a uicomponents-1.2.0-SNAPSHOT.module). I'll check for the debug logs.
Copy code
2023-09-15T17:05:57.955+0200 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] Metadata file found for module 'com.company.foundation:uicomponents:1.2.0-SNAPSHOT' in repository 'MavenLocal'.
Yep, metadata is definitely found. Working off of mavenLocal() for now, but artifactory and ~/.m2 contain the same files, and the resolution problem happens no matter the source. The squareTheme configuration gets visited first, and the roundTheme configuration gets to reuse the module metadata, but surely it wouldn't be using the wrong one, right?
Copy code
Found cached version of changing module 'com.company.foundation:uicomponents:1.2.0-SNAPSHOT' in 'MavenLocal'

Using cached module metadata for module 'com.company.foundation:uicomponents:1.2.0-SNAPSHOT' in 'MavenLocal'
d
In this case, I’ve reversed it. Project B only has
implementation(project())
and from there either publish all or publish a variant. It works for us as our use case for this as we require the latitude both variants in the dimension to be different version numbers. Project A would then define this as we would publish one for square and one for round.
squareThemeImplementation(libs.square.theme)
and
roundThemeImplementation(libs.round.theme)