avro-kotlin / avro4k

Avro format support for Kotlin
Apache License 2.0
188 stars 36 forks source link

Gradle task to generate schema definitions #134

Closed AmsterdamFilho closed 1 year ago

AmsterdamFilho commented 1 year ago

It is already possible to see the schemas for a class:

val schema = Avro.default.schema(Pizza.serializer())
println(schema.toString(true))

It would be very useful to create a gradle task that scans all serializable classes and put their schemas in the generated sources directory of the project. This could be used in the CI process to send them to schema registry.

Chuckame commented 1 year ago

Hello, avro4k is not a gradle or maven plugin for today, so we won't implement this unless someone makes a PR or another library to have this feature.