https://github.com/jhj0517/android-template-mvvm-xml
Simple Android MVVM (xml) Template without Compose
https://github.com/jhj0517/android-template-mvvm-xml
android mvvm xml
Last synced: 5 months ago
JSON representation
Simple Android MVVM (xml) Template without Compose
- Host: GitHub
- URL: https://github.com/jhj0517/android-template-mvvm-xml
- Owner: jhj0517
- Created: 2024-04-14T05:24:02.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-05T12:04:42.000Z (over 1 year ago)
- Last Synced: 2025-04-13T12:27:00.955Z (about 1 year ago)
- Topics: android, mvvm, xml
- Language: Kotlin
- Homepage:
- Size: 139 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Android MVVM (XML) Template
Simple template for MVVM with XML (Activity & Fragment) in Android, without Compose. [(Compose version)](https://github.com/jhj0517/android-template-mvvm-compose)
# Architecture

# Overview
- Notices
1. The INTERNET permission is enabled in the Manifest because there's a basic Retrofit2 usage.
2. `BuildConfig` is enabled in `build.gradle` to securely use important variables, such as `BuildConfig.API_KEY`.
3. Put important variables in **`keys.properties`**. It'll be loaded in `build.gradle`.
- Core Versions
```toml
agp = "8.3.0"
kotlin = "1.9.0"
room = "2.6.1"
hilt = "2.51.1"
gson = "2.10.1"
retrofit2 = "2.11.0"
ksp = "1.9.0-1.0.13"
okhttpLogging = "4.12.0"
```
# Usage
1. git clone this repo
```commandline
git clone https://github.com/jhj0517/android-template-mvvm-xml.git
```
2. Modify git remote url with yours
```commandline
git remote set-url origin git@github.com:your_name/repo_name.git
```
3. Go to the **Project Files** tab in the File Tree view within Android Studio, not the **Android** or **Project** tab.
- Refactor the organization name with yours

- Refactor the package name with yours

4. Change the `namespace` and `applicationId` in the module-level `build.gradle`.
```gradle
android {
namespace = "com.jhj0517.android_template_mvvm_xml" // Change
defaultConfig {
applicationId = "com.jhj0517.android_template_mvvm_xml" // Change
}
}
```
5. Change the `rootProject.name` in the `settings.gradle`
```gradle
rootProject.name = "android-template-mvvm-xml" // Change
```
6. **Build** -> **Clean Project** -> **Rebuild Project**
7. You're now ready to start your new project.