how to make avro project using gradle in kotlin code example
Example: com.commercehub.gradle.plugin.avro.generate avro java task
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath("com.commercehub.gradle.plugin:gradle-avro-plugin:0.14.2")
}
}
apply plugin: "maven"
apply plugin: "java"
apply plugin: "com.commercehub.gradle.plugin.avro-base"
group 'io.karengryg'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
jcenter()
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
maven { url "http://packages.confluent.io/maven/" }
}
dependencies {
compile 'org.springframework:spring-core:5.0.8.RELEASE'
compile 'org.springframework:spring-beans:5.0.8.RELEASE'
compile "org.apache.avro:avro:1.8.2"
compile 'io.confluent:kafka-avro-serializer:4.1.1'
testCompile 'junit:junit:4.12'
}
avro {
stringType = "CharSequence"
}
task generateAvro(type: com.commercehub.gradle.plugin.avro.GenerateAvroJavaTask) {
source("src/main/resources/avro")
outputDir = file("src/main/java/avro")
}
compileJava.source(generateAvro.outputs)