-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
127 lines (105 loc) · 3.58 KB
/
build.gradle
File metadata and controls
127 lines (105 loc) · 3.58 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
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
plugins {
id 'java'
id 'org.springframework.boot' version '3.4.4'
id 'io.spring.dependency-management' version '1.1.7'
id 'com.diffplug.spotless' version '6.25.0'
}
group = 'com.doubleo'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
// 추가: GitHub Packages 에서 grpc-interfaces 모듈(hospital-interface)만 가져오기
maven {
name = 'GitHubPackages'
url = uri('https://maven.pkg.github.com/TeamDoubleO/grpc-interfaces')
credentials {
username = System.getenv("GIT_USERNAME") ?: project.findProperty("gpr.user")
password = System.getenv("GIT_TOKEN") ?: project.findProperty("gpr.key")
}
}
}
ext {
set('springCloudVersion', "2024.0.1")
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
// config
implementation 'org.springframework.cloud:spring-cloud-starter-config'
implementation 'org.springframework.cloud:spring-cloud-starter-bus-amqp'
// Swagger
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.0'
// MySQL
implementation 'mysql:mysql-connector-java:8.0.33'
// Actuator & Micrometer
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.micrometer:micrometer-core'
implementation 'io.micrometer:micrometer-registry-prometheus'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'com.h2database:h2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
// (1) hospital-interface 모듈
implementation "com.doubleo.grpc:hospital-interface:0.2.0"
// (2) gRPC 런타임
implementation "io.grpc:grpc-netty:1.63.0"
implementation "io.grpc:grpc-protobuf:1.63.0"
implementation "io.grpc:grpc-stub:1.63.0"
// (3) Spring Boot starter for gRPC 서버/클라이언트 자동설정
implementation 'com.google.protobuf:protobuf-java:4.28.2'
implementation 'net.devh:grpc-spring-boot-starter:3.1.0.RELEASE'
//Tenant-Context
implementation 'com.doubleo:tenant-context:0.0.2'
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
tasks.named('test') {
useJUnitPlatform()
}
spotless {
java {
// Google Java 포맷 적용
/*
googleJavaFormat() : 탭은 2개의 공백
googleJavaFormat().aosp() : 탭은 4개의 공백
[참고] https://github.com/google/google-java-format/issues/525
*/
googleJavaFormat().aosp()
// import 순서 정렬
importOrder()
// 사용하지 않는 import 제거
removeUnusedImports()
// 각 라인 끝에 있는 공백을 제거
trimTrailingWhitespace()
// 파일 끝에 새로운 라인 추가
endWithNewline()
}
}
tasks.register('updateGitHooks', Copy) {
from('./scripts/') {
include 'pre-commit'
include 'prepare-commit-msg'
}
into './.git/hooks'
}
//tasks.register('makeGitHooksExecutable', Exec) {
// commandLine 'chmod', '+x', './.git/hooks/pre-commit', './.git/hooks/prepare-commit-msg'
// dependsOn updateGitHooks
//}
//
//compileJava.dependsOn makeGitHooksExecutable
//