-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
150 lines (116 loc) · 3.99 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
plugins {
id 'java'
id 'io.quarkus'
id 'com.adarshr.test-logger' version '3.2.0'
id "org.kordamp.gradle.jandex" version "2.0.0"
}
apply from: 'code-analysis/code-analysis.gradle'
repositories {
mavenCentral()
mavenLocal()
maven {
url "https://packages.confluent.io/maven/"
}
}
dependencies {
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
implementation 'io.quarkus:quarkus-container-image-jib'
// Needed for scheduled jobs
implementation 'io.quarkus:quarkus-scheduler'
// Quarkus Cassandra Platform + DataStax Cassandra Driver
implementation enforcedPlatform("${quarkusPlatformGroupId}:quarkus-cassandra-bom:${quarkusPlatformVersion}")
implementation 'com.datastax.oss.quarkus:cassandra-quarkus-client'
// Kafka Streams + Confluent Schema Registry + Avro (de)serializer
implementation 'io.quarkus:quarkus-kafka-streams'
implementation 'io.quarkus:quarkus-confluent-registry-avro'
implementation group: 'io.confluent', name: 'kafka-streams-avro-serde', version: "${confluentAvroSerdeVersion}"
//implementation("org.jboss.slf4j:slf4j-jboss-logmanager")
//testImplementation("org.jboss.slf4j:slf4j-jboss-logmanager")
//integrationTestImplementation("org.jboss.slf4j:slf4j-jboss-logmanager")
// REST implementation (Jackson serialization) + MicroProfile OpenAPI specification
implementation 'io.quarkus:quarkus-rest-jackson'
implementation 'io.quarkus:quarkus-smallrye-openapi'
testImplementation 'io.quarkus:quarkus-junit5'
testImplementation 'io.quarkus:quarkus-junit5-mockito'
// Integration / Api Tests
testImplementation 'io.rest-assured:rest-assured'
integrationTestImplementation 'io.rest-assured:rest-assured'
testImplementation 'com.datastax.oss.quarkus:cassandra-quarkus-test-framework'
integrationTestImplementation 'com.datastax.oss.quarkus:cassandra-quarkus-test-framework'
testImplementation "org.testcontainers:kafka:1.17.5"
integrationTestImplementation "org.testcontainers:kafka:1.17.5"
// Integration Testing
integrationTestImplementation 'io.quarkus:quarkus-junit5'
}
group 'net.explorviz'
version '1.0-SNAPSHOT'
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs << '-parameters'
}
compileTestJava {
options.encoding = 'UTF-8'
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
// Tasks Setups //
sourceSets {
integrationTest {
java.srcDir file('src/integrationTest/java')
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
task integrationTest(type: Test) {
description = 'Runs integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
shouldRunAfter test
}
configurations {
integrationTestImplementation.extendsFrom implementation
integrationTestRuntimeOnly.extendsFrom runtimeOnly
integrationTestImplementation.setCanBeResolved(true)
integrationTestRuntimeOnly.setCanBeResolved(true)
}
// Regarding jandex dependency for each task
// https://github.com/kordamp/jandex-gradle-plugin/issues/9
tasks.named('imageBuild') {
dependsOn 'jandex'
}
tasks.named('checkstyleMain') {
dependsOn 'jandex'
}
tasks.named('pmdMain') {
dependsOn 'jandex'
}
tasks.named('compileTestJava') {
dependsOn 'jandex'
}
tasks.named('test') {
dependsOn 'jandex'
}
tasks.named('compileIntegrationTestJava') {
dependsOn 'jandex'
}
tasks.named('integrationTest') {
dependsOn 'jandex'
}
tasks.named('quarkusDependenciesBuild') {
dependsOn 'jandex'
}
tasks.withType(JavaCompile).configureEach {
// Turn on all javac warnings except classfile and processing, which produces many false-positives about annotations
options.compilerArgs << "-Xlint:all" << "-Xlint:-classfile" << "-Xlint:-processing"
}
test {
useJUnitPlatform()
testLogging.showStandardStreams = true
}
integrationTest {
useJUnitPlatform()
testLogging.showStandardStreams = true
}