Android Random Person Demo
Demo Android application using Gradle. Project is written entirely in Kotlin with MVVM architecture, Dagger / Hilt Dependency Injection, Room Database and Retrofit API Calls
Technologies Used
Table Of Content
Structure
build.gradle
- root gradle config filesettings.gradle
- root gradle settings fileapp
- our only project in this repoapp/build.gradle
- project gradle config fileapp/src
- main project source directoryapp/src/main
- main project flavourapp/src/main/AndroidManifest.xml
- manifest fileapp/src/main/java
- java source directoryapp/src/main/res
- resources directoryapp/src/androidTest
- instrumented test source directory
Architecture
Dependencies
Dependency | Version | License |
---|---|---|
Kotlin | 1.6.20 | Apache |
Live Data | 2.4.1 | Apache 2.0 |
ViewModel | 2.4.1 | Apache 2.0 |
Navigation | 2.4.1 | Apache 2.0 |
Room | 2.4.2 | Apache 2.0 |
Retrofit | 2.9.0 | Apache 2.0 |
Coil | 2.0.0-rc02 | Apache 2.0 |
Hilt | 2.41 | Apache 2.0 |
Constraint Layout | 2.1.3 | Apache 2.0 |
About Page | 2.0.0 | MIT |
Building Application
It is recommended that you run Gradle with the --daemon
option, as starting up the tool from scratch often takes at least a few seconds. You can kill the java process that it leaves running once you are done running your commands.
Tasks work much like Make targets, so you may concatenate them. Tasks are not re-done if multiple targets in a single command require them. For example, running assemble install
will not compile the apk twice even though install
depends on assemble
.
Clean
gradle clean
Debug
This compiles a debugging apk in build/outputs/apk/
signed with a debug key, ready to be installed for testing purposes.
gradle assembleDebug
You can also install it on your attached device:
gradle installDebug
Release
This compiles an unsigned release (non-debugging) apk in build/outputs/apk/
. It's not signed, you must sign it before it can be installed by any users.
gradle assembleRelease
Test
Were you to add automated java tests, you could configure them in your build.gradle
file and run them within gradle as well.
gradle test
Lint
This analyses the code and produces reports containing warnings about your application in build/outputs/lint/
.
gradle lint
Contributing
In order to contribute to this project please see the contributing guidelines
License
This project is release under GNU GPLv3 License