Skip to content

Commit f554abf

Browse files
committed
[multi_module]: Updated readme
1 parent 60cfe40 commit f554abf

File tree

2 files changed

+66
-70
lines changed

2 files changed

+66
-70
lines changed

README.md

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,66 @@
1-
# ytemplate-android
1+
YTemplate
2+
==================
3+
YTemplate aims to build your initial setup for your Android project quickly. The project provides you organised structures following MVVM architecture and also provides dependencies to support major functionalities which an Android project needs
4+
5+
The project includes a shell script file `YTemplate.sh` which renames and restructures the Android project based on the package name, model name and application name the Android project needs.
6+
7+
### How to run the YTemplate script
8+
- The script file `YTemplate.sh` takes two inputs
9+
- `<package_name>` is your app ID and should be in lower case.
10+
- `<application_name>` Optional input
11+
- `./YTemplate.sh <package_name> <application_name>`
12+
13+
Note: To run the shell script on Windows, one can run bash on ubuntu in Windows(starting from Windows 10).
14+
Type ` bash YTemplate.sh <package_name> <data_base_entity> <application_name>`. It will execute the script
15+
16+
17+
## Features
18+
* Compose UI
19+
* HILT dependency for dependency injection
20+
* Jetpack navigation
21+
* Version catalog support for handling dependencies
22+
* MVVM architecture
23+
* Room database support for Local database
24+
* Ktor for remote database connection
25+
* Jacoco support for test report generation
26+
27+
### Architecture
28+
YTemplate follows MVVM architecture. Different modules support different layers of MVVM architecture.
29+
30+
##### Multi-Module
31+
* `app` : Entry point for the app. Provides basic structures such as Application classes, Navigation components.
32+
* `feature` : Module where different features can be added with the respective fragment/activity classes and view-models.
33+
* `core/domain`(optional) : Module to add the domain/use case layers for different features which can be shared across multiple features.
34+
* `core/data` : Module to handle the data layer of the app. This layer supports both local database and remote database.
35+
* `build-logic` : Module where the dependencies are added for the Android project and contains build configuration logics for gradle tasks.
36+
37+
![](multiModuleArchitecture.png)
38+
39+
##### Single-Module
40+
* `app` : Module to add various features to the app and providing basic structures such as Application classes, Navigation components. This is a combined version of app and feature module of Multi-module architecture.
41+
* `domain`(optional) : Package structure which can be added under app module which would contain domain/use case files. This is similar to core/domain in multi-module
42+
* `data` : Package structure to handle the data layer placed under the app module. This is similar to core/data in multi-module
43+
* `buildSrc` : Module containing complex build logic encapsulated as custom task.
44+
45+
![](singleModuleArchitecture.png)
46+
47+
### How to generate test report
48+
- Generating jacoco test report
49+
- Gradle command `clean build createMergedJacocoReport`
50+
- From android studio
51+
- Open gradle menu bar from android studio right side panel
52+
- Click on the gradle icon and
53+
- In command popup window type `clean build createMergedJacocoReport` and press enter
54+
- Wait for the execution completion,
55+
- After successful execution each module level execution report will be stored in 'module\build\reports\jacoco\html\index.html'.
56+
57+
### How to generate dokka report
58+
- Gradle command single module `clean build dokkaHtml` for multi module `clean build dokkaHtmlMultiModule`
59+
- From android studio
60+
- Open gradle menu bar from android studio right side panel
61+
- Click on the gradle icon and
62+
- In command popup window type `dokkaHtml` for multi module `dokkaHtmlMultiModule`
63+
64+
### How to check KTLint
65+
- Gradle command for checking lint error `ktlintCheck`
66+
- Gradle command for formatting code `ktlintFormat`

readme.md

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)