-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
118 lines (91 loc) · 3.47 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
107
108
109
110
111
112
113
114
115
116
117
118
plugins {
id "java"
id "io.quarkus" version "3.17.5"
id "com.adarshr.test-logger" version "3.2.0"
id "org.jetbrains.kotlin.jvm" version "2.0.21"
id "org.jetbrains.kotlin.plugin.allopen" version "2.0.21"
id "io.gitlab.arturbosch.detekt" version "1.23.7"
id "com.diffplug.spotless" version "6.25.0"
id "jacoco"
}
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://packages.confluent.io/maven/"
}
}
sourceSets.main.java.srcDirs = ["build/classes/java/quarkus-generated-sources/avdl", "src/main/java"]
dependencies {
implementation "io.quarkus:quarkus-container-image-jib"
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
implementation "io.quarkus:quarkus-kotlin"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "io.quarkus:quarkus-jackson"
implementation "io.quarkus:quarkus-scheduler"
implementation "io.quarkus:quarkus-kafka-streams"
implementation "io.quarkus:quarkus-micrometer-registry-prometheus"
implementation "io.quarkus:quarkus-grpc"
implementation "io.opentelemetry.proto:opentelemetry-proto:0.19.0-alpha"
implementation "io.quarkus:quarkus-confluent-registry-avro"
implementation group: "io.confluent", name: "kafka-streams-avro-serde", version: "${confluentAvroSerdeVersion}"
implementation "io.quarkus:quarkus-avro"
implementation "org.apache.commons:commons-lang3:3.15.0"
testImplementation group: "org.mockito", name: "mockito-all", version: "1.10.19"
testImplementation group: "org.apache.kafka", name: "kafka-streams-test-utils", version: "3.3.1"
testImplementation "io.quarkus:quarkus-junit5"
}
group "net.explorviz"
version "1.0"
compileJava {
options.encoding = "UTF-8"
options.compilerArgs << "-parameters"
}
compileTestJava {
options.encoding = "UTF-8"
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
tasks.withType(JavaCompile) {
// Turn on all javac warnings instead of class file and processing, which produces many false-positives about
// annotations and cast which is triggered by the auto-generated Dao implementations
options.compilerArgs << "-Xlint:all" << "-Xlint:-classfile" << "-Xlint:-processing" << "-Xlint:-cast"
}
test {
jvmArgs "--add-opens=java.base/java.lang=ALL-UNNAMED" // for mockito reflection
systemProperty "java.util.logging.manager", "org.jboss.logmanager.LogManager"
}
// Needed by Mockito since closed Kotlin classes cannot be mocked
allOpen {
annotation("jakarta.ws.rs.Path")
annotation("jakarta.enterprise.context.ApplicationScoped")
annotation("jakarta.persistence.Entity")
annotation("io.quarkus.test.junit.QuarkusTest")
}
spotless {
kotlin {
ktfmt().kotlinlangStyle().configure {
it.setMaxWidth(120)
}
}
}
jacocoTestReport {
dependsOn test
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
"**/opencensus/**",
"**/SerdeProducer.*",
"**/SchemaRegistryClientProducer.*",
"**/ReadOnlyKeyValueStoreProducer.*"
])
}))
}
executionData { tasks.withType(Test).findAll { it.jacoco.destinationFile.exists() }*.jacoco.destinationFile }
reports {
xml.required = true
html.required = true
}
}