An open API service indexing awesome lists of open source software.

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.

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")
```