Modules
Konvert is split into multiple modules.
The most important modules for the usage are:
-
konvert-api
This module brings the module
konvert-annotations
with it and adds constants for available converter names and option keys.-
konvert-annotations
This module contains mainly annotations which you can use to annotate your classes or mapper interfaces to generate mapping code by
Konvert
.
-
-
konvert
This is the module which bundles
konvert-processor
andkonvert-converter
together, so that you can simply use this module as your KSP processor.-
konvert-converter
Contains all the default
TypeConverter
s ofKonvert
. See here to view them all. -
konvert-processor
This is the module which contains the actual KSP implementation, which will process the annotations, collect annotated converters and generate code for each mapping.
-
To extend the functionality of Konvert the following modules are provided
-
konvert-converter-api
This module can be used to build your own
TypeConverter
s to be used by Konvert during compilation. As Konvert is using SPI, you can build your own library and just include it into KSP classpath! (TODO: reference example) -
This module can be used to build your own plugins for
Konvert
to amend the behaviour of the processor (e.g. to add annotations to the generated source code).The following plugins are already available:
-
Generate Anvil annotations (e.g.
@Singleton
) by usingkonvert-anvil-annotations
andkonvert-anvil-injector
-
Generate CDI annotations (e.g.
@RequestScoped
) by usingkonvert-cdi-annotations
andkonvert-cdi-injector
-
Generate Koin annotations (e.g.
@Single
) by usingkonvert-koin-annotations
andkonvert-koin-injector
-
Generate Spring annotations (e.g.
@Component
) by usingkonvert-spring-annotations
andkonvert-spring-injector
-