Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
62 lines (43 loc) ยท 1.72 KB
/
Copy pathbuild.gradle
File metadata and controls
62 lines (43 loc) ยท 1.72 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
plugins {
id 'org.springframework.boot' version '2.4.4'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
id 'com.github.node-gradle.node' version '3.0.1'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-security:2.4.4'
implementation 'org.springframework.boot:spring-boot-starter-web:2.4.4'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client:2.4.4'
implementation 'org.springframework.boot:spring-boot-starter-log4j2'
implementation 'io.jsonwebtoken:jjwt:0.9.1'
implementation 'javax.xml.bind:jaxb-api:2.3.0'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
}
configurations.all {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}
test {
useJUnitPlatform()
}
// ํ๋ก ํธ์๋ ์ ํ๋ฆฌ์ผ์ด์
ํ๋ก์ ํธ์ ๊ฒฝ๋ก
def frontendDir = "<Your front-end application directory>"
// ๋น๋๋ ํ๋ก ํธ์๋ ์ ํ๋ฆฌ์ผ์ด์
์ ์คํ๋ง ๋ถํธ ์ ์ ๋ฆฌ์์ค ๋๋ ํ ๋ฆฌ๋ก ๋ณต์ฌ
task copyFrontend(type: Copy) {
from "$frontendDir/build"
into "$projectDir/src/main/resources/static"
}
// node-gradle ํ๋ฌ๊ทธ์ธ์ด ์ ๊ณตํ๋ yarn_build ํ์คํฌ๋ฅผ ์คํํ๊ณ copyFrontend ํ์คํฌ๋ฅผ ๊ทธ ๋ค์์ ์คํ
copyFrontend.dependsOn(yarn_build)
// copyFrontend ํ์คํธ๊ฐ ์คํ๋ ๋ค์์ ์๋ฐ ์์ค๋ฅผ ์ปดํ์ผ
compileJava.dependsOn(copyFrontend)
// node-gradle ํ๋ฌ๊ทธ์ธ ์ค์
node {
nodeProjectDir = file("$frontendDir")
}