-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
174 lines (144 loc) · 4.28 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
167
168
169
170
171
172
173
174
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
id "org.asciidoctor.jvm.convert" version "3.3.2"
// id "com.google.cloud.tools.jib" version "3.4.2"
}
group = 'com.project-1hour'
version = '0.0.1-SNAPSHOT'
//jib {
// from {
// image = 'openjdk:21-jdk'
// }
// to {
// def region = System.getenv('REGION')
// def projectId = System.getenv('PROJECT_ID')
// def artifactRegistry = System.getenv('ARTIFACT_REGISTRY')
// def service = System.getenv('SERVICE')
//
// image = String.format('%s-docker.pkg.dev/%s/%s/%s:latest', region, projectId, artifactRegistry, service)
//
// auth {
// username = '_json_key'
// password = System.getenv('GOOGLE_AR_CLIENT_SECRET') ?: ''
// }
// }
// container {
//
// def profilesActive = System.getenv('SPRING_PROFILES_ACTIVE')
//
// jvmFlags = [
// String.format('-Dspring.profiles.active=%s', profilesActive),
// '-Xms512m',
// '-Xmx512m'
// ]
// }
//}
java {
sourceCompatibility = '21'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
asciidoctorExt
}
repositories {
mavenCentral()
}
ext {
snippetsDir = file('build/generated-snippets')
}
dependencies {
// spring
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'io.awspring.cloud:spring-cloud-aws-starter-s3:3.0.0'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
// hibernate-spatial
implementation 'org.hibernate.orm:hibernate-spatial'
// TSID
implementation 'io.hypersistence:hypersistence-utils-hibernate-60:3.5.1'
// jwt
implementation 'io.jsonwebtoken:jjwt-api:0.12.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.5'
// db
runtimeOnly 'com.mysql:mysql-connector-j'
runtimeOnly 'com.h2database:h2'
// lombok
annotationProcessor 'org.projectlombok:lombok'
compileOnly 'org.projectlombok:lombok'
// bouncycastle
implementation 'org.bouncycastle:bcpkix-jdk15on:1.70'
// apache-utils
implementation 'org.apache.commons:commons-lang3:3.12.0'
// thumbnailator
implementation 'net.coobird:thumbnailator:0.4.20'
//metadata-extractor
implementation 'com.drewnoakes:metadata-extractor:2.18.0'
// docker-compose-support
developmentOnly "org.springframework.boot:spring-boot-docker-compose"
// spring-rest-docs
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor:3.0.1'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc:3.0.1'
testImplementation 'org.springframework.restdocs:spring-restdocs-restassured:3.0.1'
// rest-assured
testImplementation 'io.rest-assured:spring-mock-mvc:5.3.2'
}
task copySecret(type: Copy) {
copy {
from './submodule-backend'
include '*.yml'
into 'src/main/resources'
}
}
task copySqlScripts(type: Copy) {
copy {
from './submodule-backend'
include '*.sql'
into 'src/main/resources/initdb'
}
}
// TODO : 배포 시 테스크 분리 고려, dev/local 개발 환경에서만 사용
task copyDockerCompose(type: Copy) {
copy {
from './submodule-backend'
include 'docker-compose.yaml'
into projectDir
}
}
task copyAuthKey(type: Copy) {
copy {
from './submodule-backend'
include 'AuthKey.p8'
into 'src/main/resources/key'
}
}
test {
outputs.dir snippetsDir
useJUnitPlatform()
}
asciidoctor.doFirst {
delete file('src/main/resources/static/docs')
}
asciidoctor {
configurations 'asciidoctorExt'
sources {
include("**/index.adoc")
}
baseDirFollowsSourceFile()
inputs.dir snippetsDir
dependsOn test
}
task createDocument(type: Copy) {
dependsOn asciidoctor
from asciidoctor.outputDir
into file("src/main/resources/static")
}
bootJar {
dependsOn createDocument
}