/
build.gradle.kts
50 lines (39 loc) · 995 Bytes
/
build.gradle.kts
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
plugins {
id("java-library")
}
// tag::parallel-4[]
// tag::parallel-calculated[]
// tag::fork-every[]
// tag::disable-reports[]
tasks.withType<Test>().configureEach {
// end::parallel-4[]
// end::parallel-calculated[]
// end::fork-every[]
// end::disable-reports[]
// tag::parallel-4[]
maxParallelForks = 4
// end::parallel-4[]
// tag::parallel-calculated[]
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
// end::parallel-calculated[]
// tag::fork-every[]
forkEvery = 100
// end::fork-every[]
// tag::disable-reports[]
reports.html.required = false
reports.junitXml.required = false
// end::disable-reports[]
// tag::parallel-4[]
// tag::parallel-calculated[]
// tag::fork-every[]
// tag::disable-reports[]
}
// end::parallel-4[]
// end::parallel-calculated[]
// end::fork-every[]
// end::disable-reports[]
// tag::fork-java[]
tasks.withType<JavaCompile>().configureEach {
options.isFork = true
}
// end::fork-java[]