-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.gradle
68 lines (59 loc) · 2.02 KB
/
main.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
allprojects {
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'io.spring.dependency-management'
// compileJava.dependsOn validateStructure
sourceCompatibility = JavaVersion.VERSION_11
dependencies {
testImplementation 'org.springframework.boot:spring-boot-starter-test'
compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}"
implementation platform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
}
test.finalizedBy(project.tasks.jacocoTestReport)
jacocoTestReport {
dependsOn test
reports {
xml.enabled true
xml.destination file("${buildDir}/reports/jacoco.xml")
csv.enabled false
html.destination file("${buildDir}/reports/jacocoHtml")
}
}
}
jacoco {
toolVersion = "${jacocoVersion}"
reportsDir = file("$buildDir/reports")
}
task jacocoMergedReport(type: JacocoReport) {
dependsOn = subprojects.jacocoTestReport
additionalSourceDirs.setFrom files(subprojects.sourceSets.main.allSource.srcDirs)
sourceDirectories.setFrom files(subprojects.sourceSets.main.allSource.srcDirs)
classDirectories.setFrom files(subprojects.sourceSets.main.output)
executionData.setFrom project.fileTree(dir: '.', include: '**/build/jacoco/test.exec')
reports {
xml.enabled true
csv.enabled false
html.enabled true
}
}
tasks.register('stage') {
defaultTasks 'bootJar'
}
tasks.withType(JavaCompile) {
options.compilerArgs = [
'-Amapstruct.suppressGeneratorTimestamp=true'
]
}
tasks.named('wrapper') {
gradleVersion = '6.9.1'
}