Issue with multimodule library publishing

Hello all, I have a particular problem, I want to modularize my projects(maybe more than I should, but it’s something personal now, point is I have my features in a library, for this example customerFeature, which has inside 1 lib for each layer(data,domain,presentation and core) till here it’s good, everything works.

Of course each layer has it’s own build.gradle with their dependencies, and in the src folder seen in the image I have like the “builder” and in the build.gradle of customerFeature I have included all the layers as dependencies, so the library customerFeature has everything ready to use outside with all the layers.
build.gradle of customerFeature:

sourceSets {
        commonMain.dependencies {
            projects.customerFeatureKMP.customerFeature.apply {
                implementation(core)
                implementation(data)
                implementation(presentation)
                implementation(domain)
            }
}

the point is that everything compiles, but the final pom and .module have each layer defined as a dependency with an undefined version:

example from .module:
      "dependencies": [
        {
          "group": "CustomerFeatureKMP.customerFeature",
          "module": "presentation",
          "version": {
            "requires": "unspecified"
          },

example from .pom
    <dependency>
      <groupId>CustomerFeatureKMP.customerFeature</groupId>
      <artifactId>presentation</artifactId>
      <version>unspecified</version>
      <scope>runtime</scope>

How can I achieve with this structure a whole thing, customerFeature as a library with the layers just included and not added as dependencies, because when I do this, in the final app I get the error because it’s trying to look for each layer individually(with undefined version btw(I know this is solveable by defining a global version, but still, in the final project it wouldn’t find the layers))


Failed to resolve:CustomerFeatureKMP.customerFeature:domain:unspecified
Failed to resolve:CustomerFeatureKMP.customerFeature:data:unspecified 
Failed to resolve:CustomerFeatureKMP.customerFeature:presentation:unspecified 
Failed to resolve:CustomerFeatureKMP.customerFeature:core:unspecified

Thanks in advance for anyone taking the time to read this, I’ve been with this for days, trying a lot of options and nothing works…

https://slack-chats.kotlinlang.org/t/27019171/hello-all-i-have-a-particular-problem-i-want-to-modularize-m#b54a417f-5867-4309-a4ef-5f144bc6545a