-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
154 lines (129 loc) · 4.02 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
buildscript {
ext {
springBootVersion = '2.3.4.RELEASE'
}
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath "io.spring.gradle:dependency-management-plugin:1.0.9.RELEASE"
classpath "gradle.plugin.com.ewerk.gradle.plugins:querydsl-plugin:1.0.10"
classpath "org.asciidoctor:asciidoctor-gradle-plugin:1.5.9.2"
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0"
}
}
subprojects {
group = 'com.songpapeople'
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'jacoco'
apply plugin: "org.sonarqube"
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2:1.4.199'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
jacoco {
toolVersion = '0.8.5'
}
jacocoTestReport {
reports {
html.enabled true
xml.enabled true
csv.enabled false
}
def Qdomains = []
for(qPattern in "**/QA" .. "**/QZ"){
Qdomains.add(qPattern+"*")
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it,
exclude: [] + Qdomains)
}))
}
finalizedBy 'jacocoTestCoverageVerification'
}
test {
useJUnitPlatform()
finalizedBy 'jacocoTestReport'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
sonarqube {
properties {
property "sonar.host.url", "https://sonar.themiso.kr"
property "sonar.login", "2036ce58eaf842e7512923b39f0a6ebb47e4f883"
property "sonar.sources", "src"
property "sonar.language", "java"
property "sonar.projectVersion", "1.0"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.coverage.jacoco.xmlReportPaths", "${buildDir}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.test.inclusions", "**/*Test.java"
}
}
}
def queryDslProjects = [project(':hashtagmap-core'), project(':hashtagmap-web'), project(':hashtagmap-admin'), project(':hashtagmap-batch')]
configure(queryDslProjects) {
apply plugin: "com.ewerk.gradle.plugins.querydsl"
dependencies {
implementation 'com.querydsl:querydsl-jpa'
}
def querydslDir = "$buildDir/generated/querydsl"
querydsl {
jpa = true
querydslSourcesDir = querydslDir
}
sourceSets {
main.java.srcDir querydslDir
}
configurations {
querydsl.extendsFrom compileClasspath
}
compileQuerydsl {
options.annotationProcessorPath = configurations.querydsl
}
}
def asciidoctorConfigure = [project(':hashtagmap-web'), project(':hashtagmap-admin')]
configure(asciidoctorConfigure) {
apply plugin: "org.asciidoctor.convert"
dependencies {
asciidoctor 'org.springframework.restdocs:spring-restdocs-asciidoctor:2.0.4.RELEASE'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc:2.0.4.RELEASE'
}
ext {
snippetsDir = file('build/generated-snippets')
}
test {
useJUnitPlatform()
outputs.dir snippetsDir
}
asciidoctor {
inputs.dir snippetsDir
dependsOn test
}
bootJar {
dependsOn asciidoctor
from("${asciidoctor.outputDir}/html5") {
into 'static/docs'
}
}
}
project(':hashtagmap-common') {
sonarqube {
skipProject = true
}
}