-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
114 lines (93 loc) · 2.82 KB
/
build.gradle
File metadata and controls
114 lines (93 loc) · 2.82 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath group: 'org.springframework.boot', name: 'spring-boot-gradle-plugin', version: '1.5.7.RELEASE'
}
}
plugins {
id 'org.flywaydb.flyway' version '4.2.0'
id 'com.gorylenko.gradle-git-properties' version '1.4.17'
id 'org.unbroken-dome.test-sets' version '1.4.2'
id 'org.sonarqube' version '2.5'
}
ext.deps = [
springVersion: '1.5.7.RELEASE'
]
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'org.unbroken-dome.test-sets'
apply plugin: 'jacoco'
group 'pm.mbo'
version = '1.0.0-SNAPSHOT'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile(group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: deps.springVersion)
compile(group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: deps.springVersion)
compile(group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: deps.springVersion)
compile(group: 'org.apache.commons', name: 'commons-lang3', version: '3.6')
runtime(group: 'com.h2database', name: 'h2', version: '1.4.196')
runtime(group: 'org.flywaydb', name: 'flyway-core', version: '4.2.0')
compileOnly(group: 'org.projectlombok', name: 'lombok', version: '1.16.18')
testCompile(group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: deps.springVersion)
}
// see https://flywaydb.org/documentation/gradle/
// run ./gradlew flywayMigrate
flyway {
url = 'jdbc:h2:file:./db/db1'
user = 'sa'
password = ''
}
springBoot {
buildInfo()
}
// specify gradle version for wrapper to use the same as on system
// recreate with 'gradle wrapper' if changed
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '4.2'
}
testSets {
integrationTest
}
check.dependsOn integrationTest
integrationTest.mustRunAfter test
jacoco {
toolVersion = '0.7.9'
}
test {
jacoco {
append = false
destinationFile = file("$buildDir/jacoco/jacoco-ut.exec")
classDumpDir = file("$buildDir/jacoco/classpathdumps")
}
}
integrationTest {
jacoco {
append = false
destinationFile = file("$buildDir/jacoco/jacoco-it.exec")
classDumpDir = file("$buildDir/jacoco/classpathdumps")
}
}
jacocoTestReport {
reports {
xml.enabled true
xml.destination file("${project.reporting.baseDir}/jacoco/report.xml")
csv.enabled false
html.enabled true
html.destination file("${project.reporting.baseDir}/jacoco/html")
}
}
sonarqube {
properties {
properties['sonar.tests'] += sourceSets.integrationTest.allSource.srcDirs
}
}