0

I'm building an SDK(not an app) with the following two library modules:

  • :internalDep - has two flavors, f1 and f2 on dimension mydimen

  • :publicModule - has dependency implementation project(":internalDep") with no flavor defined

Once released, 3 targets will be uploaded to maven central: com.my.site:internalDep-f1:0.1.2, com.my.site:internalDep-f2:0.1.2 and com.my.site:publicModule:0.1.2

Question: How to configure publicModule to use f1 by default so that when user declares dep on com.my.site:publicModule:0.1.2 they always also download com.my.site:internalDep-f1:0.1.2 ?

Note: The below config from this answer doesn't solve my issue, as it needs to be added to both publicModule and the client app, and I have no control over client app.

android {
  defaultConfig {
    missingDimensionStrategy 'myDimen', 'f1'
  }
}
Arrow Cen
  • 733
  • 1
  • 8
  • 22
  • Similar question [here])(https://stackoverflow.com/questions/53333382/missingdimensionstrategy-everywhere-is-there-no-better-way) - seems gradle just doesn't support this – Arrow Cen Mar 15 '23 at 18:36

0 Answers0