Avro compiler component for kotlin

Compilers for Avro IDL and JSON. Compiles to avro4k compatible kotlin files

License

License

GroupId

GroupId

com.github.thake.avro4k
ArtifactId

ArtifactId

avro4k-compiler
Last Version

Last Version

0.5.0
Release Date

Release Date

Type

Type

jar
Description

Description

Avro compiler component for kotlin
Compilers for Avro IDL and JSON. Compiles to avro4k compatible kotlin files

Download avro4k-compiler

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.thake.avro4k/avro4k-compiler/ -->
<dependency>
    <groupId>com.github.thake.avro4k</groupId>
    <artifactId>avro4k-compiler</artifactId>
    <version>0.5.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.thake.avro4k/avro4k-compiler/
implementation 'com.github.thake.avro4k:avro4k-compiler:0.5.0'
// https://jarcasting.com/artifacts/com.github.thake.avro4k/avro4k-compiler/
implementation ("com.github.thake.avro4k:avro4k-compiler:0.5.0")
'com.github.thake.avro4k:avro4k-compiler:jar:0.5.0'
<dependency org="com.github.thake.avro4k" name="avro4k-compiler" rev="0.5.0">
  <artifact name="avro4k-compiler" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.thake.avro4k', module='avro4k-compiler', version='0.5.0')
)
libraryDependencies += "com.github.thake.avro4k" % "avro4k-compiler" % "0.5.0"
[com.github.thake.avro4k/avro4k-compiler "0.5.0"]

Dependencies

compile (6)

Group / Artifact Type Version
org.apache.avro : avro jar 1.10.0
org.apache.commons : commons-lang3 jar 3.11
org.apache.commons : commons-text jar 1.9
org.apache.velocity : velocity-engine-core jar 2.2
com.fasterxml.jackson.core : jackson-databind jar 2.10.2
org.slf4j : slf4j-api jar 1.7.30

provided (1)

Group / Artifact Type Version
org.apache.ant : ant jar 1.10.8

test (10)

Group / Artifact Type Version
org.apache.avro : avro-compiler jar 1.10.0
org.junit.jupiter : junit-jupiter-api jar 5.7.0
org.junit.jupiter : junit-jupiter-engine jar 5.7.0
org.junit.jupiter : junit-jupiter-params jar 5.7.0
com.github.avro-kotlin.avro4k : avro4k-core jar 1.0.0
org.jetbrains.kotlin : kotlin-stdlib jar 1.4.20
org.jetbrains.kotlin : kotlin-reflect jar 1.4.20
org.jetbrains.kotlin : kotlin-compiler-embeddable jar 1.4.20
org.jetbrains.kotlin : kotlin-script-util jar 1.4.20
org.slf4j : slf4j-simple jar 1.7.30

Project Modules

There are no modules declared in this project.

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>

Versions

Version
0.5.0
0.4.0
0.3.0
0.2.0
0.0.1