A base template for MVVM-driven Kotlin-powered Android applications.
This template assumes the lowest supported Android version is 8.1 Oreo.
Template consists of the following modules:
- :application - the main application module. Produces the
.apk
file. - :base:android - contains Android specific classes and utilities.
- :base:language - exposes programming language specific extensions.
- :base:mvvm - implements Model-View-ViewModel building blocks.
- :common:network - exposes networking dependencies.
- :common:persistence - exposes persistence dependencies.
- :configuration - exposes application configuration via
Configuration
class. All those fields are gathered fromgradle.properties
file in this module. - :resources - accessible (and optionally injectable) application resources.
To simplify kick-starting new project and adapt to your needs - you have to change only few default values:
packageName
- "windly.template
";projectName
- "TemplateApplication
";- module package - "
windly.template
"; - theme base name - "
Theme.Template
"; - style base name - "
Template
";
Consider searching for
template
phrase with disabled "match case" feature.
Instead of manually customizing the project, you can also consider using the
customizer.sh
shell script.
Usage: bash customizer.sh my.new.package [ApplicationName]
For example, if you'd like to customize the project to use the following:
- package: dev.windly.solar
- application name: Solar
Execute the script as below:
bash customizer.sh dev.windly.solar Solar
As a result, the customizer shell script will change:
- root package name of all the modules
- application name
- base style and theme names
- package names in navigation graphs
So, more or less - the project will be kicked off. :)