This repository has been archived by the owner on May 22, 2024. It is now read-only.
forked from Netflix/archaius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
58 lines (48 loc) · 1.56 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
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'com.netflix.nebula.netflixoss' version '11.1.1'
}
// Establish version and status
ext.githubProjectName = rootProject.name
subprojects {
apply plugin: 'com.netflix.nebula.netflixoss'
apply plugin: 'java'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}
repositories {
mavenCentral()
}
dependencies {
testImplementation 'com.google.guava:guava:33.+'
testImplementation 'org.slf4j:slf4j-reload4j:1.7.36'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.+'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation 'org.mockito:mockito-core:4.+'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.+'
}
group = "com.netflix.${githubProjectName}"
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
test {
useJUnitPlatform()
}
tasks.withType(Test) {
var testJdk = System.getProperty("testJdk", "8")
System.console().printf("Launching tests using JDK %s%n", testJdk)
javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(testJdk)
}
if (javaLauncher.get().metadata.languageVersion.asInt() >= 11) {
// Mockito 4 will not work on JDK >=11 without this. Mockito 5 does not work on JDK8 at all :-/
jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED'
}
}
}