-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
61 lines (48 loc) · 1.65 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
plugins {
id 'java'
id 'checkstyle'
id 'com.diffplug.spotless' version '6.25.0'
}
repositories {
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
// https://mvnrepository.com/artifact/org.junit.platform/junit-platform-launcher
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.2'
// https://mvnrepository.com/artifact/org.mockito/mockito-core
testImplementation 'org.mockito:mockito-core:5.11.0'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
sourceCompatibility = JavaVersion.VERSION_21
}
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets.main.java.srcDirs = ['src/main/java/', 'solution/main/java/']
sourceSets.test.java.srcDirs = ['src/test/java/']
test {
useJUnitPlatform()
}
checkstyle {
configFile = file('checkstyle.xml')
// Default version vs. current version? The default version is quite old (9.3 from
// Jan 30, 2022), so let's go with the current version (10.14).
// However, this needs to be updated manually as Dependabot won't deal with this!
toolVersion = '10.15.0'
ignoreFailures = false
maxWarnings = 0
}
// Workaround to resolve CS dependencies: https://github.com/checkstyle/checkstyle/issues/14123#issuecomment-1961029772
configurations.checkstyle {
resolutionStrategy.capabilitiesResolution.withCapability("com.google.collections:google-collections") {
select("com.google.guava:guava:0")
}
}
spotless {
java {
googleJavaFormat().aosp().reflowLongStrings()
}
}