-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
74 lines (68 loc) · 2.79 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
import java.time.Duration
buildscript {
ext {
junit5Version = '5.7.2' // https://junit.org/junit5/
junit5PlatformVersion = '1.7.2'
slf4jVersion = '1.7.30' // http://www.slf4j.org/download.html
// https://github.com/FasterXML/jackson/wiki/Jackson-Releases
jacksonVersion = '2.13.0' // https://github.com/FasterXML/jackson-databind/releases
// retrofit is why we need allow-opens. context: https://stackoverflow.com/questions/60915381/retrofit2-maven-project-illegal-reflective-access-warning // https://github.com/square/retrofit/issues/3341
retrofitVersion = "2.9.0" // https://github.com/square/retrofit/releases
okhttpVersion = "4.9.1" // https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp
dockerComposePluginVersion = "0.16.12"
}
repositories {
mavenCentral()
}
dependencies {
classpath "com.avast.gradle:gradle-docker-compose-plugin:$dockerComposePluginVersion"
}
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'docker-compose'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
maven { url "https://repo.maven.apache.org/maven2" }
}
dependencies {
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: junit5Version
testImplementation "org.junit.jupiter:junit-jupiter-params:$junit5Version"
testImplementation "org.junit.platform:junit-platform-commons:$junit5PlatformVersion"
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: junit5Version
implementation 'org.jetbrains:annotations:21.0.1' // https://search.maven.org/search?q=g:org.jetbrains%20AND%20a:annotations
}
test {
useJUnitPlatform {
excludeTags 'integration'
}
if(JavaVersion.current() >= JavaVersion.VERSION_1_9) {
// If we don't have this, we get warnings for something about retrofit2.Platform
jvmArgs "--add-opens=java.base/java.lang.invoke=ALL-UNNAMED"
}
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile){
options.compilerArgs << "-Xlint:deprecation"
}
}
task integration(type: Test) {
useJUnitPlatform {
includeTags 'integration'
}
if(JavaVersion.current() >= JavaVersion.VERSION_1_9) {
// If we don't have this, we get warnings for something about retrofit2.Platform
jvmArgs "--add-opens=java.base/java.lang.invoke=ALL-UNNAMED"
}
}
dockerCompose {
useComposeFiles = ['../testing/docker-compose.yml']
isRequiredBy integration
waitForTcpPortsTimeout = Duration.ofMinutes(1)
}
}
wrapper {
gradleVersion = '6.9'
distributionType = Wrapper.DistributionType.ALL
}