Skip to content

Latest commit

 

History

History
40 lines (35 loc) · 1.36 KB

README.md

File metadata and controls

40 lines (35 loc) · 1.36 KB

Avro compiler for avro4k

This is a generator for avro4k compatible kotlin source files. The generator is based on the avro java compiler.

Unsupported features:

  • Protocol generation
  • Union types other than a Union with null

Additional features:

  • Kotlin data classes may have a different name than avro records.

Compatibility:

  • < 0.5.0 Avro4k 0.41.0
  • 0.5.0 Avro4k 1.0.0 (package names have changed)

Maven plugin usage:

<build>
    <plugins>
        <plugin>
            <groupId>com.github.thake.avro4k</groupId>
            <artifactId>avro4k-maven-plugin</artifactId>
            <version>0.5.0</version>
            <configuration>
                <sourceDirectory>${avro.schema.directory}</sourceDirectory>
                <outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
                <renamedClasses>
                    <renamedClass>
                        <regex>my.namespace.(\w+)Record</regex>
                        <replacement>other.namespace.$1</replacement>
                    </renamedClass>
                </renamedClasses>
            </configuration>            				        
        </plugin>
        ...
    </plugins>
</build>