-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.gradle
More file actions
62 lines (43 loc) · 1.72 KB
/
build.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")
}