Slide 1

Slide 1 text

Try to modularize a not so legacy Android App

Slide 2

Slide 2 text

Customer: "I want an App and a SDK"

Slide 3

Slide 3 text

The obvious solution someProject/android someProject/sdk

Slide 4

Slide 4 text

The obvious solution someProject/android someProject/sdk consumes

Slide 5

Slide 5 text

The obvious solution - requirements someProject/android someProject/sdk consumes artifactory CI/CD

Slide 6

Slide 6 text

The modularization solution someProject/android /app /sdk Benefits: ● No headache with artifactory and CI/CD ● Development of the SDK is "on the fly" ● … more?!

Slide 7

Slide 7 text

Customer: "The SDK should contain feature A,B,C and X,Y,Z"

Slide 8

Slide 8 text

The obvious solution someProject/android Packages: awesome/feature/a awesome/feature/b awesome/feature/c awesome/feature/x awesome/feature/y awesome/feature/z /sdk

Slide 9

Slide 9 text

The modularization solution someProject/android /y /c /b /a /z /x /sdk Benefits: ● Each is decoupled of others ● Could be published independently ● Wrapper SDK provide still the full SDK ● app modules could pick only features which they require ● … more?!

Slide 10

Slide 10 text

Customer: "We use Scandit for scanning barcodes. Here are the licenses. Uh - and maybe we will replace it later with XYZ"

Slide 11

Slide 11 text

The obvious solution - Try to abstract it away someProject/android /app /build.gradle add licenses Implementation: awesome/scaninng/ abstract.kt scanditImpl.kt

Slide 12

Slide 12 text

The modularization solution someProject/android /app /build.gradle add licenses Implementation: awesome/scaninng/ abstract.kt internal/scanditImpl.kt /scanning Benefits: ● Clear separation in our build files ● scanning module can be changed without touching /app ● … more?!

Slide 13

Slide 13 text

Developer: "Our onboarding is so heavily. Let's extract it"

Slide 14

Slide 14 text

The obvious solution someProject/android /onboarding /app

Slide 15

Slide 15 text

The obvious solution someProject/android /onboarding /app HELP! I need some files* from /app * files like `layouts` or utility classes

Slide 16

Slide 16 text

The obvious solution someProject/android /onboarding /app /resources /utils

Slide 17

Slide 17 text

The obvious solution someProject/android /onboarding /app /resources /utils HELP! I need some files from /sdk

Slide 18

Slide 18 text

The obvious solution someProject/android /onboarding /app /resources /a /sdk

Slide 19

Slide 19 text

The obvious (and correct) solution someProject/android /onboarding /app /resources /a /sdk

Slide 20

Slide 20 text

Audience: "Well, that looks weird and complicated"

Slide 21

Slide 21 text

Speaker: "No it's not. It's like playing lego and pick only the correct bricks together"

Slide 22

Slide 22 text

Q'nd A