-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
89 lines (74 loc) · 2.4 KB
/
build.gradle.kts
File metadata and controls
89 lines (74 loc) · 2.4 KB
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
plugins {
java
jacoco
id("jvm-test-suite")
id("com.gradleup.shadow") version "9.3.0"
id("com.diffplug.spotless") version "8.1.0"
id("com.github.spotbugs") version "6.4.7"
id("com.avast.gradle.docker-compose") version "0.17.20"
id("com.github.ben-manes.versions") version "0.53.0"
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories { mavenCentral() }
val flinkVersion = "2.2.0"
dependencies {
compileOnly("org.apache.flink:flink-streaming-java:$flinkVersion")
testImplementation("org.junit.jupiter:junit-jupiter-api:6.0.1")
testImplementation("org.apache.flink:flink-test-utils:$flinkVersion")
testImplementation("org.assertj:assertj-core:3.27.6")
testImplementation("org.mockito:mockito-junit-jupiter:5.21.0")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("org.slf4j:slf4j-simple:2.0.17")
}
tasks.named<Test>("test") {
useJUnitPlatform()
}
testing {
suites {
configureEach {
if (this is JvmTestSuite) {
dependencies {
implementation("org.assertj:assertj-core:3.27.6")
}
}
}
val test by getting(JvmTestSuite::class) {
dependencies {
val junitVersion = "6.0.1"
implementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
implementation("org.apache.flink:flink-test-utils:$flinkVersion")
implementation("org.mockito:mockito-junit-jupiter:5.21.0")
runtimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
runtimeOnly("org.slf4j:slf4j-simple:2.0.17")
}
}
register<JvmTestSuite>("integrationTest") {
dependencies {
implementation("com.mashape.unirest:unirest-java:1.4.9")
implementation("org.awaitility:awaitility:4.3.0")
implementation("com.github.docker-java:docker-java:3.7.0")
}
}
}
}
tasks {
"jacocoTestReport"(JacocoReport::class) {
reports {
xml.required.set(true)
html.required.set(true)
}
}
"check" { dependsOn("jacocoTestReport") }
}
dockerCompose {
isRequiredBy(tasks["integrationTest"])
setProjectName(null)
}
spotless {
java { googleJavaFormat() }
kotlinGradle { ktlint() }
}