-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
106 lines (89 loc) · 3.07 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import com.commercehub.gradle.plugin.avro.GenerateAvroJavaTask
buildscript {
dependencies {
classpath "com.commercehub.gradle.plugin:gradle-avro-plugin:0.20.0"
}
}
plugins {
id "org.jetbrains.kotlin.jvm" version "1.4.10"
id "org.jetbrains.kotlin.kapt" version "1.4.10"
id "org.jetbrains.kotlin.plugin.allopen" version "1.4.10"
id "com.github.johnrengelman.shadow" version "6.0.0"
id "io.micronaut.application" version '1.0.3'
id "com.commercehub.gradle.plugin.avro" version "0.20.0"
}
version "0.1"
group "micronaut.kafka.avro"
repositories {
mavenCentral()
maven { url "https://jitpack.io/" }
maven { url "https://jcenter.bintray.com" }
maven { url 'https://packages.confluent.io/maven/' }
}
configurations {
developmentOnly
}
dependencies {
implementation "javax.annotation:javax.annotation-api"
compile "org.apache.avro:avro:1.10.0"
implementation("io.confluent:kafka-avro-serializer:$confluentVersion")
implementation("io.confluent:kafka-streams-avro-serde:$confluentVersion")
implementation("io.confluent:kafka-json-serializer:$confluentVersion")
implementation("io.confluent:kafka-json-schema-serializer:$confluentVersion")
implementation("io.micronaut:micronaut-validation")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
implementation("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
implementation("io.micronaut.kotlin:micronaut-kotlin-runtime")
implementation("io.micronaut:micronaut-runtime")
implementation("javax.annotation:javax.annotation-api")
implementation("io.micronaut:micronaut-http-client")
implementation("io.micronaut.graphql:micronaut-graphql")
implementation("io.micronaut.kafka:micronaut-kafka")
implementation("io.micronaut.kafka:micronaut-kafka-streams")
runtimeOnly("ch.qos.logback:logback-classic")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("io.micronaut:micronaut-management")
testImplementation("org.apache.kafka:kafka-streams-test-utils:2.5.0")
testImplementation "org.assertj:assertj-core:3.14.0"
testImplementation "io.mockk:mockk:1.9.3"
}
run.jvmArgs('-noverify', '-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote')
test.classpath += configurations.developmentOnly
mainClassName = "micronaut.kafka.avro.Application"
micronaut {
runtime "netty"
testRuntime "junit5"
processing {
incremental true
annotations "micronaut.kafka.avro.*"
}
}
java {
sourceCompatibility = JavaVersion.toVersion('11')
}
compileKotlin {
kotlinOptions {
jvmTarget = '11'
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = '11'
}
}
tasks.withType(JavaCompile){
options.encoding = "UTF-8"
options.compilerArgs.add('-parameters')
}
shadowJar {
mergeServiceFiles()
}
task generateAvro(type: GenerateAvroJavaTask) {
source("src/main/resources/avro")
outputDir = file("src/main/java")
}
compileJava.source(generateAvro.outputs)
avro {
stringType = "CharSequence"
fieldVisibility = "PRIVATE"
}