1

Im facing the task to add instant delivery, and thus modularization, to a pretty big monolithic app. Reading docs, articles and sample projects for a few days im kind of struggling with getting my head around this task.

The app is a single module monolithic app, one MainActivity with multiple Fragments. It has tons of content, but for the sake of simplicity let's assume i have the screens/features home, news, events and partners. Im struggling with setting up the new project setup by splitting up the existing app module. The code is already well structured, but i don't fully understand which type of modules to use.

This is how wi would set this up, maybe some of you guys have a bit of experience and could tell me if im on the right path, or totally wrong:

:app (application module, dynamic feature)

:core

  • :networking (android library)
  • :utils (kotlin library)
  • :model (kotlin library)

:features

  • :home (android library)
  • :news (android library)
  • :events (android library)
  • :partners (android library)

:instant

  • :news (instant dynamic feature)
  • :events (instant dynamic feature)

In this example, :app would be the fully installed app, and contains everything from :core and :features. My instant apps, for example :news, would only contain the code from :core and :features:news. Am i right here, or am i completely lost?

ANY help is appreciated, let me know if i need to clarify stuff!

W3hri
  • 1,563
  • 2
  • 18
  • 31

0 Answers0