🧠Mappy is a Annotation Processor to auto-generate mapper functions for your architecture layer models. It creates mappers for database Entities and UI models.
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.
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
allprojects {
repositories {
maven (url = "https://jitpack.io")
}
}
Groovy
allprojects {
repositories {
maven {url = 'https://jitpack.io' }
}
}
Step 2. Add the dependency
implementation("com.github.kl3jvi.mappy:mappy-core:1.0.1")
kapt("com.github.kl3jvi.mappy:mappy-processor:1.0.1")