Gradle plugin for processing Avro files for Gora
Generate Apache Gora java types from an Apache Avro descriptor (.avsc files). This plugin will delegate to GoraCompiler all schema read and file generation.
Configure the plugin in your project as follows:
buildscript { repositories { jcenter() } dependencies { classpath "org.apache.gora.gradle:gora-gradle-plugin:0.6.1" } } apply plugin: "org.apache.gora" dependencies { compile "org.apache.gora:gora-core:0.6.1" }
Avro schema descriptors (.avsc) have to in the following directory :
src/main/resources/
You can generate Gora java types using compileGora directly or using build task:
$ gradle compileGora $ gradle build
If you want to build this plugin from a Git checkout, please use Gradle Wrapper :
./gradlew clean build publishToMavenLocal
As per the Gora Release HOWTO we release the gora-gradle-plugin post release of the Gora release artifacts including the Maven artifacts.
In order to publish the plugin you must first register with Gradle plugins portal and add your API key and secret to your $USER_HOME/.gradle/gradle.properties :
gradle.publish.key=abc gradle.publish.secret=xyz
Then run the following :
cd $GORA_HOME/gora-gradle-plugin; ./gradlew clean publishPlugins
This does the following