-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
51 lines (40 loc) · 1.45 KB
/
build.gradle
File metadata and controls
51 lines (40 loc) · 1.45 KB
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
plugins {
id 'base'
}
ext.bearBuildRunId = System.currentTimeMillis().toString()
ext.bearBuildRootDir = new File(rootDir, ".bear-build/${ext.bearBuildRunId}")
// Keep root-project outputs under an ignored repo-local root to avoid temp-path locking issues.
buildDir = new File(ext.bearBuildRootDir, "root")
subprojects {
apply plugin: 'java'
// Work around Windows file locking issues by writing Gradle outputs under an ignored repo-local root.
// This keeps outputs stable across runs while avoiding tracked build folders in the repo.
buildDir = new File(rootProject.ext.bearBuildRootDir, project.name)
group = 'com.bear'
version = '0.1.0-SNAPSHOT'
repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType(JavaCompile).configureEach {
options.release = 17
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
}
test {
useJUnitPlatform()
testLogging {
events 'failed'
showStandardStreams = true
exceptionFormat = 'full'
}
}
// Windows can hold open files under test results; use a fresh binary results dir per build run.
tasks.withType(Test).configureEach {
binaryResultsDirectory = new File(rootProject.ext.bearBuildRootDir, "${project.name}/test-results/binary")
}
}