-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
106 lines (88 loc) · 2.91 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.4'
id 'io.spring.dependency-management' version '1.1.3'
id 'org.sonarqube' version '4.3.1.3277'
}
group = 'com.lovely-4k'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
repositories {
mavenCentral()
}
// 루트 프로젝트는 jar 파일을 만들 필요가 없기 때문에 false로 설정
bootJar {
enabled = false
}
sonar {
properties {
property "sonar.projectKey", "Lovely-4K_love-backend"
property "sonar.organization", "lovely-4k"
property "sonar.host.url", "https://sonarcloud.io"
property 'sonar.coverage.exclusions', '**/*Request.java, **/*Response.java, **/docs, **/utils, **/*Config*.java, **/resources/**, **/*Exception*.java, **/com/lovely4k/backend/authentication/**, **/com/lovely4k/backend/common/sessionuser/**, **/*pointcut*.java, **/com/lovely4k/backend/common/error/**, **/*Event.java'
property 'sonar.exclusions', '**/*Application*.java, **/com/lovely4k/backend/common/imageuploader/**'
}
}
subprojects {
group = 'com.lovely4k'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
apply plugin: 'java'
apply plugin: 'java-library' //하위 모듈이 상위 모듈의 라이브러리를 의존할 수 있게 하는 플러그인
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.springframework.boot'
apply plugin: 'jacoco'
apply plugin: 'org.sonarqube' //하위 모듈에 전부 소나클라우드 적용
sonar {
properties {
property "sonar.coverage.jacoco.xmlReportPaths", "build/reports/jacoco/test/jacocoTestReport.xml"
}
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacocoTestReport {
reports {
xml.required = true
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: ['**/*Request.class', '**/*Response.class'])
}))
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'com.tngtech.archunit:archunit-junit5:1.1.0'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
repositories {
mavenCentral()
}
//ide에 코틀린 플러그인이 적용되어 있어 설정함
tasks.register("prepareKotlinBuildScriptModel") {}
}
// api 모듈은 common, model 모듈에 의존
project(':api') {
dependencies {
implementation project(':common')
implementation project(':model')
}
}
// model 모듈은 common 모듈에 의존
project(':model') {
dependencies {
implementation project(':common')
}
}