forked from LarsEckart/bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
61 lines (52 loc) · 1.52 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 'com.github.ben-manes.versions' version '0.28.0'
id 'jacoco'
}
repositories {
mavenCentral()
}
dependencies {
def junitVersion = '5.6.1'
def assertjVersion = '3.15.0'
def approvalVersion = '4.0.2'
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-params:${junitVersion}")
testImplementation("org.assertj:assertj-core:${assertjVersion}")
testImplementation("com.approvaltests:approvaltests:${approvalVersion}")
}
tasks.withType(JavaCompile) {
options.compilerArgs.add("-Xlint:all")
options.compilerArgs.add("--enable-preview")
}
test {
jvmArgs("--enable-preview")
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
finalizedBy jacocoTestReport
}
jacoco {
toolVersion = "0.8.5"
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination file("${buildDir}/jacocoHtml")
}
}
dependencyUpdates.resolutionStrategy {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm', 'preview', 'b', 'ea'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]$qualifier[.\d-+]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
}