-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
159 lines (131 loc) · 4.03 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
buildscript {
ext {
// ソースと実行ファイルのJavaバージョン
jdkVersion = jdkVersion
defaultEncoding = defaultEncoding
// SpringBoot
springBootVersion = springbootVersion
// SpringBootAdmin
springbootAdminVersion = springbootAdminVersion
// ModelMapper
modelmapperVersion = modelmapperVersion
// jUnit5
jupiterVersion = jupiterVersion
platformVersion = platformVersion
}
repositories {
jcenter()
}
}
plugins {
id "org.springframework.boot" version "2.1.1.RELEASE"
id "org.sonarqube" version "2.6.2"
}
apply from: "$rootDir/gradle/ide.gradle"
sonarqube {
properties {
property "sonar.github.repository", "mabubu0203/BookManager"
property "sonar.host.url", "http://localhost:9000/sonar"
property "sonar.jacoco.reportPaths", { "${project.buildDir}/jacoco/test.exec" }
property "sonar.jdbc.driverClassName", "org.postgresql.Driver"
property "sonar.jdbc.password", "sonar"
property "sonar.jdbc.url", "jdbc:postgresql://localhost:5432/sonar"
property "sonar.jdbc.username", "sonar"
property "sonar.junit.reportsPaths", { "${project.buildDir}/test-results" }
property "sonar.language", "java"
property "sonar.links.issue", "https://github.com/mabubu0203/BookManager/issues"
property "sonar.links.scm", "https://github.com/mabubu0203/BookManager/"
property "sonar.scm.provider", "git"
}
}
allprojects {
apply plugin: 'jacoco'
apply plugin: 'java'
repositories {
jcenter()
}
jacoco {
toolVersion = "0.8.2"
reportsDir = file("$buildDir/customJacocoReportDir")
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
javadoc {
doFirst {
exclude "**/module-info.java"
options {
addBooleanOption('html5', true)
author = true
charSet = defaultEncoding
docEncoding = defaultEncoding
encoding = defaultEncoding
links(
"https://docs.oracle.com/en/java/javase/11/docs/api/",
"https://docs.spring.io/spring-boot/docs/current/api/"
)
linkSource = true
noHelp = true
setMemberLevel(JavadocMemberLevel.PUBLIC)
setNoQualifiers(["all"])
}
}
}
compileJava {
doFirst {
sourceCompatibility = jdkVersion
targetCompatibility = jdkVersion
options.encoding = defaultEncoding
options.compilerArgs += [
"-Xlint:unchecked", "-Xlint:deprecation",
"--module-path", classpath.asPath
]
classpath = files()
}
}
}
subprojects {
apply plugin: 'application'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.springframework.boot'
apply plugin: 'war'
repositories {
jcenter()
}
task('default') {
dependsOn 'clean', 'check'
}
}
project(':micro-admin') {
ext.moduleName = 'jp.team.study.bm.admin'
}
project(':micro-api') {
ext.moduleName = 'jp.team.study.bm.api'
dependencies {
compile project(':micro-interfaces'), project(':micro-validator'), project(':micro-rdb')
testCompile project(':micro-test')
}
}
project(':micro-interfaces') {
ext.moduleName = 'jp.team.study.bm.interfaces'
dependencies {
compile project(':micro-validator')
testCompile project(':micro-test')
}
}
project(':micro-rdb') {
ext.moduleName = 'jp.team.study.bm.rdb'
dependencies {
compile project(':micro-interfaces'), project(':micro-validator')
testCompile project(':micro-test')
}
}
project(':micro-test') {
ext.moduleName = 'jp.team.study.bm.test'
}
project(':micro-validator') {
ext.moduleName = 'jp.team.study.bm.validator'
}