Skip to content

Opinionated Android app starter template. I pick the best choice(s) of libraries & solutions (imo) and keep it ready for forking off and building your next Android app.

Notifications You must be signed in to change notification settings

kaushikgopal/playground-android

Repository files navigation

Playground Android

This is a template project for Android development. I use it as a way to test new concepts or integrate libraries that are otherwise hard in a more complex project.

Some of the concepts implemented here:

Getting started

  • Download this repository and open the template folder on Android Studio
  • in libs.versions.toml change app-namespace to your desired package name
  • in AndroidStudio rename the app package sh.kau.playground
  • Check if the manifest package was renamed along with the package
  • In app/build.gradle.kts, change the applicationId to the new app package

Ready to Use and you're ready to start working on your new app!

App module diagram (multi-module setup)

Below diagram should give you an idea of how the inter module dependencies are setup. In practice, when you add feature modules it is pretty straightforward as the core requirements are already setup. See the Landing feature's build.gradle.kts file as an example for how simple the build script for new features land up being.

The dependency graph is widest at the top (:app module) and becomes more focused and self-contained as you move down through domain and common modules. So modules at the bottom have lesser dependencies and are more self-contained.

App module diagram

  • new features are added to :features module
  • the core :app module itself assembles all the dependencies (and is intentionally lean)
  • template.feature = custom gradle plugin that sets up a fully functional feature for your app
  • template.android = custom gradle plugin that has the things you need for a pure android lib
    • think jvm target, minSDK etc. that you don't want to repeat everywhere
  • :common modules are shared but can be hot-swapped with another implementation (possible)
  • :domain modules are specific to the app but also shared (but not intended to be swapped out)

I talked about this in ep #252 of Fragmented

About

Opinionated Android app starter template. I pick the best choice(s) of libraries & solutions (imo) and keep it ready for forking off and building your next Android app.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published