-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.gradle
56 lines (49 loc) · 1.14 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
plugins {
id 'java-library'
id 'jacoco'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
}
}
test {
onlyIf { false }
}
task e2eTest(type: Test) {
ext.parseEnvFile = { filePath ->
file(filePath).readLines().each() {
if (!it.isEmpty() && !it.startsWith("#")) {
def (key, value) = it.tokenize('=')
if (key.startsWith("export ")) {
key = key.split("export ")[1];
}
if (System.getenv(key) == null) {
environment key, value
}
}
}
}
if(file('../e2e-tests/.env').exists()) {
parseEnvFile('../e2e-tests/.env')
} else if(file('../.env').exists()){
parseEnvFile('../.env')
}
useJUnitPlatform()
testLogging {
exceptionFormat = 'full'
}
}
dependencies {
testImplementation 'org.jetbrains:annotations:16.0.2'
testImplementation 'org.postgresql:postgresql:42.6.1'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.0'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.0'
testImplementation 'com.zaxxer:HikariCP:5.0.1'
}