-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
executable file
·90 lines (74 loc) · 2.03 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
plugins {
id 'org.springframework.boot' version '2.2.5.RELEASE'
id 'java'
id 'groovy'
id 'com.commercehub.gradle.plugin.avro' version '0.19.0'
id 'io.spring.dependency-management' version '1.0.7.RELEASE'
}
group = 'com.github.chasdevs.events'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.12'
repositories {
mavenCentral()
maven {
url 'http://packages.confluent.io/maven/'
}
}
ext {
avdlSrcDir = 'schemas'
avprGenDir = 'target/generated/avpr'
avscGenDir = 'target/generated/avsc'
javaGenDir = 'target/events-java/src/main/java' // used for publishing java library
}
sourceSets {
test {
groovy {
srcDirs = ["src/test/java", "src/test/groovy"]
}
}
}
test {
testLogging {
events "passed", "skipped", "failed"
}
dependsOn "cleanTest"
outputs.upToDateWhen { false }
exclude '**/*IntegrationSpec*'
}
dependencies {
implementation 'org.springframework.shell:spring-shell-starter:2.0.0.RELEASE'
implementation 'io.confluent:kafka-schema-registry-client:5.3.0'
implementation 'org.apache.avro:avro:1.9.2'
implementation 'org.apache.avro:avro-compiler:1.9.2'
implementation 'com.google.guava:guava:28.2-jre'
implementation 'com.hotels:avro-compatibility:2.2.0'
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.spockframework:spock-core:1.3-groovy-2.5'
}
clean {
delete avprGenDir, avscGenDir, javaGenDir
}
task generateAvpr(type: com.commercehub.gradle.plugin.avro.GenerateAvroProtocolTask) {
source(file(avdlSrcDir))
outputDir = file(avprGenDir)
}
task generateAvsc(type: com.commercehub.gradle.plugin.avro.GenerateAvroSchemaTask) {
dependsOn generateAvpr
source(file(avprGenDir))
outputDir = file(avscGenDir)
doLast {
delete avprGenDir
}
}
task generateJava(type: com.commercehub.gradle.plugin.avro.GenerateAvroJavaTask) {
dependsOn generateAvsc
source(file(avscGenDir))
outputDir = file(javaGenDir)
doLast {
delete avscGenDir
}
}
build.doLast {
println(jar.archivePath)
}