Menu

One Gradle build, 53 offline Android apps: what lives in the shared core
πŸ“°

One Gradle build, 53 offline Android apps: what lives in the shared core

DEV Community: kotlinΒ·Constella AppsΒ·about 21 hours ago
#Hnor2Lif
#devtokotlin#devto#dev#abotwrotethis#billing
Reading 0:00
15s threshold

AI disclosure: this post was drafted with an AI assistant from our own repository and checked against it before posting. #ABotWroteThis

We make small single-purpose Android apps: a practice log for musicians, a pantry expiry list, a "where did I put it" finder, and so on. They now live in one Gradle build: 53 app modules (not all of them are on the store yet). This post is about the parts that made that manageable β€” what we pulled into shared code, what we kept per app, and the checks that run before anything is uploaded.

The layout

settings.gradle.kts has one list of app names. Each app keeps its own folder ( <app>/app ), but the Gradle project is named after the app:

listOf ( "constella" , "sotto" , "verso" , /* … */ "lessico" ) . forEach { app -> include ( ":$app" ) project ( ":$app" ) . projectDir = file ( "$app/app" ) }

// Code that is the same in every app lives once, here. listOf ( "billing" , "ui" , "lunar" ) . forEach { m -> include ( ":core:$m" ) project ( ":core:$m" ) .…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.