Skip to content

Commit d7690b5

Browse files
authored
Merge pull request #40 from bnc-projects/update-dependencies
Update dependencies and remove coverage verification
2 parents 01880cd + f349af1 commit d7690b5

File tree

2 files changed

+33
-54
lines changed

2 files changed

+33
-54
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[![Build Status](https://travis-ci.com/bnc-projects/spring-boot-java-base.svg?branch=master)](https://travis-ci.com/bnc-projects/spring-boot-java-base)
2-
[![codecov](https://codecov.io/gh/bnc-projects/spring-boot-java-base/branch/master/graph/badge.svg)](https://codecov.io/gh/bnc-projects/spring-boot-java-base)
3-
[![Known Vulnerabilities](https://snyk.io/test/github/bnc-projects/spring-boot-java-base/badge.svg)](https://snyk.io/test/github/bnc-projects/spring-boot-java-base)
2+
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=spring-boot-java-base&metric=alert_status)](https://sonarcloud.io/api/project_badges/measure?project=spring-boot-java-base&metric=alert_status)
3+
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=spring-boot-java-base&metric=coverage)](https://sonarcloud.io/api/project_badges/measure?project=spring-boot-java-base&metric=coverage)
4+
[![Known Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=spring-boot-java-base&metric=vulnerabilities)](https://sonarcloud.io/api/project_badges/measure?project=spring-boot-java-base&metric=vulnerabilities)
45
# Spring Boot Java Base
56

67
## How tos

build.gradle

Lines changed: 30 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
plugins {
2-
id "com.github.spotbugs" version "1.6.5"
3-
id "org.springframework.boot" version "2.1.0.RELEASE"
2+
id 'java'
3+
id 'jacoco'
4+
id 'checkstyle'
5+
id 'eclipse'
6+
id 'idea'
7+
id "com.github.spotbugs" version "1.6.6"
8+
id "org.springframework.boot" version "2.1.1.RELEASE"
49
id "io.spring.dependency-management" version "1.0.6.RELEASE"
510
id "com.palantir.docker" version "0.20.1"
6-
id "org.owasp.dependencycheck" version "3.3.4"
711
id "org.sonarqube" version "2.6.2"
812
id "com.gorylenko.gradle-git-properties" version "1.5.2"
913
}
1014

15+
1116
group = 'com.bnc'
1217
version = '0.0.1-SNAPSHOT'
1318

14-
apply plugin: 'java'
15-
apply plugin: 'jacoco'
16-
apply plugin: 'checkstyle'
17-
apply plugin: 'com.github.spotbugs'
18-
apply plugin: 'eclipse'
19-
apply plugin: 'idea'
20-
2119
sourceCompatibility = 1.8
2220
targetCompatibility = 1.8
2321

@@ -29,15 +27,15 @@ repositories {
2927
}
3028

3129
spotbugs {
32-
toolVersion = '3.1.8'
30+
toolVersion = '3.1.10'
3331
}
3432

3533
jacoco {
3634
toolVersion = "0.8.2"
3735
}
3836

3937
checkstyle {
40-
toolVersion '8.14'
38+
toolVersion '8.15'
4139
}
4240

4341
springBoot {
@@ -57,32 +55,6 @@ jacocoTestReport {
5755
html.enabled true
5856
csv.enabled false
5957
}
60-
61-
afterEvaluate {
62-
classDirectories = files(classDirectories.files.collect {
63-
fileTree(dir: it, exclude: [
64-
'**/configuration/**'
65-
])
66-
})
67-
}
68-
}
69-
70-
jacocoTestCoverageVerification {
71-
afterEvaluate {
72-
classDirectories = files(classDirectories.files.collect {
73-
fileTree(dir: it, exclude: [
74-
'**/configuration/**'
75-
])
76-
})
77-
}
78-
79-
violationRules {
80-
rule {
81-
limit {
82-
minimum = 0.8
83-
}
84-
}
85-
}
8658
}
8759

8860
sonarqube {
@@ -99,7 +71,10 @@ test {
9971
events "passed", "skipped", "failed"
10072
}
10173

102-
finalizedBy jacocoTestReport, jacocoTestCoverageVerification
74+
jacoco {
75+
excludes += [ '**/configuration/**' ]
76+
}
77+
finalizedBy jacocoTestReport
10378
}
10479

10580
if (!project.hasProperty("REPOSITORY_URI")) {
@@ -117,22 +92,25 @@ docker {
11792
buildArgs(['JAR_FILE': "${bootJar.archiveName}"])
11893
}
11994

95+
dependencyManagement {
96+
imports {
97+
mavenBom "org.springframework.cloud:spring-cloud-sleuth:2.1.0.M2"
98+
}
99+
}
100+
120101
dependencies {
121-
def springBootVersion = '2.1.0.RELEASE'
122-
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: springBootVersion
123-
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: springBootVersion
124-
// Update this to release version and remove milestone repo
125-
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-sleuth', version: '2.1.0.M1'
126-
implementation group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: '3.1.8'
127-
implementation group: 'io.micrometer', name: 'micrometer-registry-new-relic', version: '1.1.0'
102+
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web'
103+
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator'
104+
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-sleuth'
105+
implementation group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: '3.1.10'
106+
implementation group: 'io.micrometer', name: 'micrometer-registry-new-relic', version: '1.1.1'
128107
runtime group: 'org.postgresql', name: 'postgresql', version: '42.2.5'
129108

130-
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: springBootVersion
131-
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.3.1'
109+
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
110+
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.3.2'
132111
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.11.1'
133-
testImplementation group: 'org.mockito', name: 'mockito-core', version: '2.23.0'
134-
// Remove once Mockito 3.x gets released with Junit 5 support
135-
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '2.23.0'
136-
testRuntime group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.3.1'
112+
testImplementation group: 'org.mockito', name: 'mockito-core', version: '2.23.4'
113+
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '2.23.4'
114+
testRuntime group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.3.2'
137115
testRuntime group: 'com.h2database', name: 'h2', version: '1.4.197'
138116
}

0 commit comments

Comments
 (0)