This repository has been archived by the owner on Feb 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
166 lines (138 loc) · 5.08 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
160
161
162
163
164
165
166
plugins {
id 'nebula.project' version '6.0.3'
id 'nebula.info' version '5.0.3'
id 'nebula.optional-base' version '5.0.3'
id 'nebula.release' version '10.1.1'
id 'nebula.lint' version '11.5.0'
id 'nebula.maven-publish' version '11.0.0' apply false
id 'nebula.maven-apache-license' version '11.0.0' apply false
id 'nebula.source-jar' version '11.0.0' apply false
id 'org.springframework.boot' version '2.1.4.RELEASE' apply false
id 'io.spring.dependency-management' version '1.0.7.RELEASE' apply false
id 'io.spring.propdeps' version '0.0.10.RELEASE' apply false
id 'com.github.spotbugs' version '1.6.9' apply false
id 'com.github.ben-manes.versions' version '0.21.0'
id 'com.dorongold.task-tree' version '1.3.1'
}
allprojects {
apply plugin: 'nebula.release'
apply plugin: 'nebula.info'
apply plugin: 'nebula.project'
apply plugin: 'nebula.optional-base'
apply plugin: 'nebula.lint'
group 'com.github.aafwu00'
contacts {
moniker 'Taeho Kim'
role 'Developer'
}
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'io.spring.dependency-management'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = sourceCompatibility
test {
useJUnitPlatform()
reports {
html.enabled = true
}
}
if (!project.name.contains('sample')) {
apply plugin: 'checkstyle'
apply plugin: 'com.github.spotbugs'
apply plugin: 'pmd'
apply plugin: 'jacoco'
apply plugin: 'maven-publish'
apply plugin: 'nebula.maven-publish'
apply plugin: 'nebula.source-jar'
apply plugin: 'nebula.maven-apache-license'
apply plugin: 'com.dorongold.task-tree'
apply plugin: 'com.github.ben-manes.versions'
dependencyUpdates.resolutionStrategy = {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm', 'dev', 'snapshot'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject('Release Candidate')
}
}
}
}
checkstyle {
toolVersion = '8.20'
ignoreFailures = false
maxErrors = 0
maxWarnings = 0
configFile = rootProject.file('config/checkstyle/checkstyle_checks.xml')
configProperties = ['checkstyle.header.file' : "${rootProject.projectDir}/config/checkstyle/java.header",
'checkstyle.regexp.header.file': "${rootProject.projectDir}/config/checkstyle/java_regexp.header",
'checkstyle.suppressions.file' : "${rootProject.projectDir}/config/checkstyle/suppressions.xml",
'checkstyle.importcontrol.file': "${rootProject.projectDir}/config/checkstyle/import-control.xml"]
}
spotbugs {
toolVersion = '3.1.12'
ignoreFailures = false
effort = 'max'
reportLevel = 'high'
}
tasks.withType(com.github.spotbugs.SpotBugsTask) {
reports {
xml.enabled = false
html.enabled = true
}
}
pmd {
toolVersion = '6.14.0'
ruleSetFiles = rootProject.files('config/pmd/rulesets.xml')
ignoreFailures = true
rulePriority = 3
}
jacoco {
toolVersion = '0.8.3'
}
jacocoTestReport {
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
}
}
if (project.name.endsWith('sample')) {
apply plugin: 'org.springframework.boot'
}
if (project.name.contains('autoconfigure')) {
apply plugin: 'propdeps'
apply plugin: 'propdeps-maven'
apply plugin: 'propdeps-idea'
apply plugin: 'propdeps-eclipse'
compileJava.dependsOn(processResources)
}
repositories {
mavenLocal()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencyManagement {
imports {
mavenBom org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES
}
}
dependencies {
if (!project.name.contains('sample')) {
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.9.0'
}
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
if (project.name.contains('autoconfigure')) {
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
}
}
}