Gradle: Working with multi app projects in Android Studio

In this tutorial I wanted to share how is my project organized to work with multiple apps and libraries.




I have the following settings.gradle in the root of my Project:

include ':app'
include ':appBookShelf'
include ':appNFC'
include ':appUnitConverter'
include ':appUserPreferences'
include ':libraries:ListViewSwipeActivity'



Please note that I perpend my app names with "app.." to keep them organized, I also have a folder "libraries" where I keep the code of my submodules.

Here is my folder structure:


CIT299 $ t
.
├── CIT299.iml
├── app
│   ├── app.iml
│   ├── build
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src
├── appBookShelf
│   ├── build
│   ├── build.gradle
│   └── src
├── appNFC
│   ├── build
│   ├── build.gradle
│   └── src
├── appUnitConverter
│   ├── appUnitConverter.iml
│   ├── build
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src
├── appUserPreferences
│   ├── build.gradle
│   └── src
├── build.gradle
├── gradle
│   └── wrapper
├── gradle.properties
├── gradlew
├── gradlew.bat
├── libraries
│   └── ListViewSwipeActivity
├── local.properties
└── settings.gradle



As an Amazon Associate I earn from qualifying purchases.

My favorite quotations..


“A man should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.”  by Robert A. Heinlein

"We are but habits and memories we chose to carry along." ~ Uki D. Lucas


Popular Recent Articles