Anthony Mamode
05/22/2025, 11:18 AM:umbrella
module to iOS via a binary .xcframework
, which internally depends on several modules like :data
, :core
, :featureA
, :featureB,
etc.
Problem is: on iOS all code from every dependency is bundled in the final binary. That means I can’t optimize build size per target, and every consumer ends up with the full transitive dependency tree.
The goal here is to be able to build specific ios targets using only :featureA and not :featureB for example.
❓Has anyone faced this limitation? Is the only solution being to move to a monorepo architecture?
Would love any tips, documentation or feedback on this 🙏Pablichjenkov
05/22/2025, 12:07 PMAnthony Mamode
05/22/2025, 12:24 PMPablichjenkov
05/22/2025, 12:41 PMPablichjenkov
05/22/2025, 12:44 PMLukáš Kúšik
05/22/2025, 2:17 PM:app
and :widget
modules for each of them. Both modules depend on a :feature1
module.
I haven't tested it yet, but I believe in this case, the :feature1
code will be included twice in the final .ipa
, in both the app and the widget frameworks. Has anyone dealt with this before and so can explain what happens?Anthony Mamode
05/22/2025, 2:21 PMLukáš Kúšik
05/22/2025, 2:22 PMPablichjenkov
05/22/2025, 2:23 PMAnthony Mamode
05/22/2025, 2:24 PMPablichjenkov
05/22/2025, 2:26 PM:feature1
but if it is a transitive dependency you won't notice it so easy.
That's why one entry point is the recommended way, so Gradle guarantees no duplicates dependencies are put togetherLukáš Kúšik
05/22/2025, 2:28 PMapp
and widget extension
targets that both consume only one of the frameworks at a time.