View Source mix compile.elixir_avro_codegen (elixir_avro v0.1.0)

Mix compiler to allow mix to compile Avro source files into Elixir modules.

Looks for elixir_avro_codegen key in your mix project config

def project do
  [
    # ...
    elixir_avro_codegen: [
      schema_path: "avro",
      target_path: "avro",
      prefix: "MyApp.Avro",
      verbose: true
    ],
    compilers: Mix.compilers() ++ [:elixir_avro_codegen],
    # ...
  ]
end

Required options are:

  • schema_path: The path to the directory containing the Avro schema files.
  • target_path: The path to the directory where the generated Elixir code will be saved.
  • prefix: The prefix to be used for the generated Elixir modules.

Optional options are:

  • verbose: Enable verbose output. Defaults to false.

Summary

Functions

Callback implementation for Mix.Task.Compiler.run/1.

Functions