-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
75 lines (62 loc) · 2.1 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
71
72
73
74
75
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id "java-library"
id 'jacoco-report-aggregation'
}
group = rootPackageName
version = springDogVersion
apply from: "lint.gradle"
allprojects {
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
}
apply plugin: "java-library"
apply plugin: "jacoco"
dependencies {
compileOnly "org.springframework.boot:spring-boot-starter-web:${springbootVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-params:${junitVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
testImplementation "org.assertj:assertj-core:${assertjVersion}"
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
testImplementation "org.mockito:mockito-junit-jupiter:${mockitoVersion}"
testImplementation "org.apache.cayenne:cayenne-server:${cayenneVersion}"
testImplementation "org.junit-pioneer:junit-pioneer:${junitPioneerVersion}"
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
reports {
xml.required.set(true)
html.required.set(true)
}
}
}
dependencies {
jacocoAggregation subprojects
}
tasks.register('jacocoRootReport', JacocoReport) {
dependsOn subprojects.test
additionalSourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs)
additionalClassDirs = files(subprojects.sourceSets.main.output)
executionData = files(subprojects.jacocoTestReport.executionData)
reports {
xml.required.set(true)
html.required.set(true)
}
}
tasks.named('jacocoTestReport') {
dependsOn jacocoRootReport
}