android-starter is a starter project for Android development with a modular architecture. It consists of three modules: app, DataModule, and UiModule. The DataModule handles network-related tasks and database string operations, while the UiModule contains all the Compose components that can be used in the app module.
The app module is the main module of the project written in Compose. It contains the user interface and business logic of the application.
- The
DataModulemodule is responsible for handling network-related tasks and database string operations. It provides the necessary data for theappmodule.
- The
Loggerclass in theDataModuleis an object class that provides logging functionality for the module.
- The
DataModulealso includes an extension function for checking internet connectivity.
The DataModule module includes the following dependencies:
// Hilt
implementation 'com.google.dagger:hilt-android:2.44.2'
kapt 'com.google.dagger:hilt-android-compiler:2.44.2'
implementation 'com.google.dagger:hilt-android-gradle-plugin:2.45'
// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
// Logging interceptor
implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0'
// Encrypted shared preference
implementation 'androidx.security:security-crypto:1.0.0'
- The UiModule module holds all the Compose components that can be used in the app module. It provides reusable UI components and layouts.
- Minimum Android version: 12 or K 33.
To get started with the android-starter project, follow these steps:
- Clone the repository:
git clone https://github.com/coditas-llp/android-starter.git - Open the project in Android Studio.
- Build and run the
appmodule on an emulator or physical device with the required Android version.
