mcarleio / konvert

This kotlin compiler plugin is using KSP API and generates kotlin code to map one class to another
https://mcarleio.github.io/konvert/
Apache License 2.0
86 stars 8 forks source link

Make api independent of converter-api #5

Closed mcarleio closed 1 year ago

mcarleio commented 1 year ago

Removes the need to have the actual TypeConverter in your source code available in case you want to enable one for a mapping. Instead, all TypeConverters now have a name and you can define the name instead.

For a help, all available TypeConverter names are now defined as constants in api module. Also added available option names to api module.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.04 :warning:

Comparison is base (a09cccf) 82.79% compared to head (25a022d) 82.76%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #5 +/- ## ========================================== - Coverage 82.79% 82.76% -0.04% ========================================== Files 45 45 Lines 1715 1712 -3 Branches 233 233 ========================================== - Hits 1420 1417 -3 Misses 158 158 Partials 137 137 ``` | [Impacted Files](https://codecov.io/gh/mcarleio/konvert/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marcel) | Coverage Δ | | |---|---|---| | [...in/io/mcarle/konvert/converter/DateToXConverter.kt](https://codecov.io/gh/mcarleio/konvert/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marcel#diff-Y29udmVydGVyL3NyYy9tYWluL2tvdGxpbi9pby9tY2FybGUva29udmVydC9jb252ZXJ0ZXIvRGF0ZVRvWENvbnZlcnRlci5rdA==) | `95.23% <ø> (ø)` | | | [...n/io/mcarle/konvert/converter/SameTypeConverter.kt](https://codecov.io/gh/mcarleio/konvert/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marcel#diff-Y29udmVydGVyL3NyYy9tYWluL2tvdGxpbi9pby9tY2FybGUva29udmVydC9jb252ZXJ0ZXIvU2FtZVR5cGVDb252ZXJ0ZXIua3Q=) | `100.00% <ø> (ø)` | | | [...o/mcarle/konvert/converter/TemporalToXConverter.kt](https://codecov.io/gh/mcarleio/konvert/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marcel#diff-Y29udmVydGVyL3NyYy9tYWluL2tvdGxpbi9pby9tY2FybGUva29udmVydC9jb252ZXJ0ZXIvVGVtcG9yYWxUb1hDb252ZXJ0ZXIua3Q=) | `97.87% <ø> (ø)` | | | [...in/io/mcarle/konvert/converter/XToDateConverter.kt](https://codecov.io/gh/mcarleio/konvert/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marcel#diff-Y29udmVydGVyL3NyYy9tYWluL2tvdGxpbi9pby9tY2FybGUva29udmVydC9jb252ZXJ0ZXIvWFRvRGF0ZUNvbnZlcnRlci5rdA==) | `94.73% <ø> (ø)` | | | [...o/mcarle/konvert/converter/XToTemporalConverter.kt](https://codecov.io/gh/mcarleio/konvert/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marcel#diff-Y29udmVydGVyL3NyYy9tYWluL2tvdGxpbi9pby9tY2FybGUva29udmVydC9jb252ZXJ0ZXIvWFRvVGVtcG9yYWxDb252ZXJ0ZXIua3Q=) | `96.87% <ø> (ø)` | | | [...io/mcarle/konvert/processor/konvert/KonvertData.kt](https://codecov.io/gh/mcarleio/konvert/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marcel#diff-cHJvY2Vzc29yL3NyYy9tYWluL2tvdGxpbi9pby9tY2FybGUva29udmVydC9wcm9jZXNzb3Iva29udmVydC9Lb252ZXJ0RGF0YS5rdA==) | `87.09% <ø> (ø)` | | | [.../konvert/processor/konvert/KonvertTypeConverter.kt](https://codecov.io/gh/mcarleio/konvert/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marcel#diff-cHJvY2Vzc29yL3NyYy9tYWluL2tvdGxpbi9pby9tY2FybGUva29udmVydC9wcm9jZXNzb3Iva29udmVydC9Lb252ZXJ0VHlwZUNvbnZlcnRlci5rdA==) | `80.00% <ø> (ø)` | | | [.../mcarle/konvert/processor/konvert/KonverterData.kt](https://codecov.io/gh/mcarleio/konvert/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marcel#diff-cHJvY2Vzc29yL3NyYy9tYWluL2tvdGxpbi9pby9tY2FybGUva29udmVydC9wcm9jZXNzb3Iva29udmVydC9Lb252ZXJ0ZXJEYXRhLmt0) | `80.95% <ø> (ø)` | | | [...e/konvert/processor/konvertfrom/KonvertFromData.kt](https://codecov.io/gh/mcarleio/konvert/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marcel#diff-cHJvY2Vzc29yL3NyYy9tYWluL2tvdGxpbi9pby9tY2FybGUva29udmVydC9wcm9jZXNzb3Iva29udmVydGZyb20vS29udmVydEZyb21EYXRhLmt0) | `75.00% <ø> (ø)` | | | [.../processor/konvertfrom/KonvertFromTypeConverter.kt](https://codecov.io/gh/mcarleio/konvert/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marcel#diff-cHJvY2Vzc29yL3NyYy9tYWluL2tvdGxpbi9pby9tY2FybGUva29udmVydC9wcm9jZXNzb3Iva29udmVydGZyb20vS29udmVydEZyb21UeXBlQ29udmVydGVyLmt0) | `73.33% <ø> (ø)` | | | ... and [4 more](https://codecov.io/gh/mcarleio/konvert/pull/5?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marcel) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marcel). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marcel)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.