-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
93 lines (80 loc) · 2.85 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
plugins {
id 'org.springframework.boot' version '2.2.5.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'org.springframework.boot.experimental.thin-launcher' version '1.0.23.RELEASE'
id 'java'
id 'maven'
id 'idea'
id 'jacoco'
id "org.sonarqube" version "2.7.1"
}
group = 'com.dgf'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
apply plugin: 'jacoco'
// thin-launcher shouldn't need this...
jar {
manifest {
attributes(
'Start-Class': 'com.dgf.shopcart.ShopCartApp'
)
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
jar.dependsOn = [thinProperties] //thin-launcher
plugins.withType(JacocoPlugin) {
tasks["test"].finalizedBy 'jacocoTestReport'
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
jcenter()
}
dependencies {
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-webflux'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-security'
implementation group: 'org.springframework.session', name: 'spring-session-core'
// implementation group: 'org.springframework.boot', name: 'spring-boot-devtools'
compileOnly group: 'org.springframework.boot.experimental', name: 'spring-boot-thin-gradle-plugin', version: '1.0.23.RELEASE'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testCompile 'org.springframework.security:spring-security-test'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'io.projectreactor:reactor-test'
testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
}
test {
useJUnitPlatform()
}
jacocoTestReport {
getAdditionalSourceDirs().setFrom(files(sourceSets.main.allSource.srcDirs))
getSourceDirectories().setFrom(files(sourceSets.main.allSource.srcDirs))
getClassDirectories().setFrom(files(sourceSets.main.output))
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
}
task jacocoRootReport(type: JacocoReport) {
dependsOn = subprojects.test
getAdditionalSourceDirs().setFrom(files(subprojects.sourceSets.main.allSource.srcDirs))
getSourceDirectories().setFrom(files(subprojects.sourceSets.main.allSource.srcDirs))
getClassDirectories().setFrom(files(subprojects.sourceSets.main.output))
getExecutionData().setFrom(files(subprojects.jacocoTestReport.executionData))
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
}