/mill-avrohugger

Mill module for generating scala classes from Avro schemas with Avrohugger

Primary LanguageScalaApache License 2.0Apache-2.0

Build Status

mill-avrohugger - Build avro Bundles with mill

Module to convert avro schemas to scala classes with AvroHugger and mill build tool

Quickstart

File: build.sc
// build.sc default imports
import mill._, mill.scalalib._
// This import the mill-avrohugger plugin
import $ivy.`com.chmist::com.chmist.mill.avrohugger:0.0.1`
import com.chmist.mill.avrohugger._

object project extends ScalaModule with AvroHuggerModule {
   def scalaVersion = "2.12.7"
}

Use mill 0.3.6 or newer, to build the avro bundle.

$ mill project.compileAvro
project.compileAvro
Input files to compile:
  project/avro/tutorial/Person.avsc

Configuration

To convert avro schemas, your module has to implement com.chmist.mill.avro.AvroHuggerModule.

Configuration options
  • def avroHuggerVersion: T[String] - The avrohugger version. By default it is 1.0.0-RC15

  • def avroSources: Sources - The source folder for avro schemas. By default it is avro.

License

Apache License, version 2

Version Compatibility Matrix

Mill is still in active development, and has no stable API yet. Hence, not all mill-avrohugger versions work with every mill version.

The following table shows a matrix of compatible mill and mill-avrohugger versions.

Table 1. Version Compatibility Matrix
mill-avrohugger mill

0.0.1

0.3.6

Changelog

mill-avrohugger 0.0.1 - 2019-03-08

  • Initial early release to gain user feedback