-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
99 lines (81 loc) · 2.46 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
94
95
96
97
98
99
plugins {
id 'org.springframework.boot' version '2.2.4.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
id 'idea'
id 'jacoco'
id "org.sonarqube" version "2.8"
}
group 'ch.uzh.ifi.seal'
version '1.0.0'
sourceCompatibility = 1.13
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
repositories {
mavenCentral()
}
springBoot {
mainClassName = 'ch.uzh.ifi.seal.soprafs20.Application'
}
dependencies {
implementation 'org.mapstruct:mapstruct:1.3.1.Final'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.3.1.Final'
testAnnotationProcessor 'org.mapstruct:mapstruct-processor:1.3.1.Final'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.5.2'
}
bootJar {
baseName = 'gs-spring-boot'
version = '0.1.0'
}
test {
useJUnitPlatform()
testLogging.showStandardStreams = true
maxParallelForks = 1
}
test.finalizedBy jacocoTestReport
jacoco {
toolVersion = "0.8.5"
reportsDir = file("$buildDir/jacocoReportDir")
}
jacocoTestReport {
group = "Reporting"
reports {
xml.enabled true
csv.enabled false
html.destination file("${buildDir}/jacocoHtml")
}
}
File secretPropsFile = file('./local.properties')
if (secretPropsFile.exists()) {
Properties p = new Properties()
p.load(new FileInputStream(secretPropsFile))
p.each { name, value ->
ext[name] = value
}
}
sonarqube {
properties {
property "sonar.projectKey", project.sonarProjectKey
property "sonar.organization", project.sonarOrganization
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.login", project.sonarToken
property "sonar.coverage.jacoco.xmlReportPaths", ["$buildDir/jacocoReportDir/test/jacocoTestReport.xml"]
property "sonar.cpd.exclusions", "**/entity/*.java,**/rest/dto/*.java"
}
}
project.tasks["sonarqube"].dependsOn {
test
}
defaultTasks 'bootJar', 'build'