curioustechizen
02/05/2020, 3:41 PMMyApp
- app
- feature1_domain
- feature1_presentation
- feature2_domain
- feature2_presentation
- and so on
All the _`domain` modules serve the purpose of common
in KMP (they have platform-agnostic code already). app
, and all the _presentation
modules have Android-specific code.
Wondering what's the best approach to add iOS here. From what I understand, the goal is to generate a single .framework
from the common code for use in iOS. I did not find any examples of thisKris Wong
02/05/2020, 3:49 PMSam
02/05/2020, 3:51 PMMyApp //Android depends on MyAppLib
- app
- feature1_presentation
- feature2_presentation
- and so on
MyAppIOS //depends on MyAppLib.framework (umbrella framework)
MyAppLib //Android & iOS lib
- feature1_domain
- feature2_domain
- and so on
curioustechizen
02/05/2020, 4:35 PMKris Wong
02/05/2020, 4:36 PMcurioustechizen
02/05/2020, 4:38 PMKris Wong
02/05/2020, 4:40 PMcurioustechizen
02/05/2020, 4:41 PM_domain
modules are currently are apply plugin: 'kotlin'
and apply plugin: 'java-library'
I could turn them all into
apply plugin: 'org.jetbrains.kotlin.multiplatform'
Kris Wong
02/05/2020, 4:43 PMLarten
02/05/2020, 4:50 PMKurt Renzo Acosta
02/07/2020, 9:28 AMAndroid:
- app
- feature-1
- feature-2
Shared:
- shared-feature-1 (domain and data)
- shared-feature-2 (domain and data)
- shared-ios
shared-ios
just exports the modules through export(project(:shared-feature-1
and all other modules and you can consume it in android normally.