https://github.com/kl3jvi/mappy
🧠Mappy is an Annotation Processor to auto-generate mapper functions for your architecture layer models. It creates mappers for database Entities and UI models.
https://github.com/kl3jvi/mappy
android entity-model kotlin kotlin-symbol-processing ksp mapper ui-model
Last synced: about 2 months ago
JSON representation
🧠Mappy is an Annotation Processor to auto-generate mapper functions for your architecture layer models. It creates mappers for database Entities and UI models.
- Host: GitHub
- URL: https://github.com/kl3jvi/mappy
- Owner: kl3jvi
- Created: 2022-04-20T23:01:25.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-04-30T12:05:19.000Z (about 2 years ago)
- Last Synced: 2025-03-22T15:51:41.176Z (2 months ago)
- Topics: android, entity-model, kotlin, kotlin-symbol-processing, ksp, mapper, ui-model
- Language: Kotlin
- Homepage:
- Size: 484 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
🧠Mappy is a Annotation Processor to auto-generate mapper functions for your architecture layer models. It creates mappers for database Entities and UI models.## Why Mappy?
Mappy generates extension functions for each different model. You can reduce writing repeated mapper classes for every different model by auto-generating based on annotation processor.
You can massively reduce writing repeated files such as `_Mapper` classes.
![]()
> **Note-Usage**: The names of field to be excluded should be exactly the same as their defined name on data class.
## Gradle Setup
To use Mappy library in your project, you need to follow steps below.
Step 1. Add the JitPack repository to your build file
Kotlin DSL
```kotlin
allprojects {
repositories {
maven (url = "https://jitpack.io")
}
}
```Groovy
```kotlin
allprojects {
repositories {
maven {url = 'https://jitpack.io' }
}
}
```Step 2. Add the dependency
```kotlin
implementation("com.github.kl3jvi.mappy:mappy-core:1.0.1")
kapt("com.github.kl3jvi.mappy:mappy-processor:1.0.1")
```