Loading repository data…
Loading repository data…
vmadalin / repository
📚 Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.
Android Components Architecture in a Modular Word is a sample project that presents modern, 2020 approach to Android application development using Kotlin and latest tech-stack.
The goal of the project is to demonstrate best practices, provide a set of guidelines, and present modern Android application architecture that is modular, scalable, maintainable and testable. This application may look simple, but it has all of these small details that will set the rock-solid foundation of the larger app suitable for bigger teams and long application lifecycle management.
The project received different mentions/reference from Android Developer Community:
First off, you require the latest Android Studio 4.1.0 (or newer) to be able to build the app.
You need to supply keys for Marvel API. You can find information about how to gain access by using the link.
When you obtain the keys, you can provide them to the app by putting the following in the local.properties project root file:
#Marvel API KEYS
marvel.key.public = <insert>
marvel.key.private = <insert>
To maintain the style and quality of the code, are used the bellow static analysis tools. All of them use properly configuration and you find them in the project root directory .{toolName}.
| Tools | Config file | Check command | Fix command |
|---|---|---|---|
| detekt | /.detekt | ./gradlew detekt | - |
| ktlint | - | ./gradlew ktlint | ./gradlew ktlintFormat |
| spotless | /.spotless | ./gradlew spotlessCheck | ./gradlew spotlessApply |
| lint | /.lint | ./gradlew lint | - |
All these tools are integrated in pre-commit git hook, in order ensure that all static analysis and tests passes before you can commit your changes. To skip them for specific commit add this option at your git command:
git commit --no-verify
The pre-commit git hooks have exactly the same checks as CircleCI and are defined in this script. This step ensures that all commits comply with the established rules. However the continuous integration will ultimately be validated that the changes are correct.
App support different screen sizes and the content has been adapted to fit for mobile devices and tablets. To do that, it has been created a flexible layout using one or more of the following concepts:
In terms of design has been followed recommendations android material design comprehensive guide for visual, motion, and interaction design across platforms and devices. Granting the project in this way a great user experience (UX) and user interface (UI). For more info about UX best practices visit link.
Moreover, has been implemented support for dark theme with the following benefits:
| Mode | Characters list | Characters favorite | Character detail |
|---|---|---|---|
| Light | |||
| Dark |
The architecture of the application is based, apply and strictly complies with each of the following 5 points:
Modules are collection of source files and build settings that allow you to divide a project into discrete units of functionality. In this case apart from dividing by functionality/responsibility, existing the following dependence between them:
The above graph shows the app modularisation:
:app depends on :core and indirectly depends on :features by dynamic-features.:features modules depends on :commons, :core, :libraries and :app.:core and :commons only depends for possible utils on :libraries.:libraries don’t have any dependency.The :app module is an com.android.application, which is needed to create the app bundle. It is also responsible for initiating the dependency graph, play core and another project global libraries, differentiating especially between different app environments.