forked from Together-Java/JShellPlaygroundBackend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
70 lines (60 loc) · 1.77 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.25.0'
}
}
group = 'org.togetherjava'
version = project.version
subprojects {
apply plugin: 'java'
apply plugin: 'com.diffplug.spotless'
spotless {
java {
targetExclude("build/**")
endWithNewline()
removeUnusedImports()
// empty string '' covers all imports that aren't explicitly specified,
// we use it as catch-all for external dependencies like JDA
// '\\#` is prefix for static imports
importOrder('','org.togetherjava', 'javax', 'java', '\\#')
// TODO: pinning version because of spotless error https://github.com/diffplug/spotless/issues/1992
eclipse("4.31").configFile("${rootProject.rootDir}/spotless.xml")
}
}
group = 'org.togetherjava'
version = project.version
tasks.withType(JavaCompile).configureEach {
options.release = 21
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
repositories {
mavenCentral()
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
maxParallelForks = Runtime.runtime.availableProcessors()
systemProperty 'line.separator', '\n'
systemProperty 'file.encoding', 'utf-8'
}
sourceSets {
test {
java {
srcDirs 'src/test/integration', 'src/test/unit'
}
}
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
}
}