Features
- Kotlin Multiplatform First: Works seamlessly across a wide range of targets:
- Android & JVM/Desktop
- JavaScript (Browser & Node.js)
- Wasm (JS & Wasi)
- iOS, macOS, watchOS, tvOS
- Linux
- Type-Safe & Compile-Time Verified: All mappings are generated and validated by KSP at compile time. No reflection, no runtime errors.
- Zero Runtime Dependencies: The annotation library is
SOURCE-only and adds no overhead to your production app. - Broad Class Support: Out-of-the-box support for
data,enum, andsealedclasses, including complex nested hierarchies. - Powerful Mapping Customization:
- Property Renaming: Easily map properties with different names using
@PropertyMapping. - Default Values: Provide fallback values for missing or
nullproperties with@DefaultValue.
- Property Renaming: Easily map properties with different names using
- Advanced Type Conversion:
- Custom Converters: Define your own conversion logic for complex types (like
UuidorInstant) using@AutoConverter. - Automatic Primitive Conversion: Handles conversions between primitives like
Int,Long,Stringautomatically.
- Custom Converters: Define your own conversion logic for complex types (like
- Smart & Safe Generation:
- Bidirectional Mapping: Generate forward and reverse mappings with a single
reversible = trueflag. - Visibility Control: Generated code automatically inherits the visibility (
publicorinternal) of your@AutoMapperModule. @OptInPropagation: Automatically propagates@OptInannotations from your custom converters to the generated functions, ensuring compile-time safety for experimental APIs.
- Bidirectional Mapping: Generate forward and reverse mappings with a single