-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
87 lines (68 loc) · 1.93 KB
/
build.gradle
File metadata and controls
87 lines (68 loc) · 1.93 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
plugins {
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'org.sonarqube' version '3.0'
}
allprojects {
group = 'com.ioglyph.modulo'
version = new ProjectVersion(0, 0, 1, System.env.BUILD_IDENTIFIER).toString()
ext {
junitVersion = "5.4.2"
jaxbVersion = "2.3.3"
}
ext['hikaricp.version'] = "3.4.3"
repositories {
mavenCentral()
}
}
sonarqube {
properties {
property 'sonar.host.url', 'http://localhost:9000'
property "sonar.sourceEncoding", "UTF-8"
}
}
configure(subprojects.findAll()) {
apply plugin: 'java'
apply plugin: 'org.sonarqube'
apply plugin: 'jacoco'
apply plugin: 'io.spring.dependency-management'
sourceCompatibility = 11
targetCompatibility = 11
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-params:${junitVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
}
dependencyManagement {
imports { mavenBom("org.springframework.boot:spring-boot-dependencies:2.4.0") }
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacocoTestReport { reports { xml.enabled true } }
jar { archiveVersion = project.version }
plugins.withType(JavaPlugin).configureEach {
java {
modularity.inferModulePath = true
}
}
sonarqube {
properties {
}
}
}
wrapper { gradleVersion = '6.6.1' }
class ProjectVersion {
Integer major, minor, patch
String build
ProjectVersion(Integer major, Integer minor, Integer patch, String build){
this.major = major
this.minor = minor
this.patch = patch
this.build = build
}
@Override
String toString() {
return "$major.$minor.$patch" + (build ? ".$build" : "-SNAPSHOT")
}
}