forked from sesac-mini2/JachuiPlan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
133 lines (106 loc) · 3.45 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.4.0'
id 'io.spring.dependency-management' version '1.1.6'
}
group = 'com.trace'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
// validation
implementation 'org.springframework.boot:spring-boot-starter-validation'
// lombok
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
// devtools
developmentOnly 'org.springframework.boot:spring-boot-devtools'
// test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'org.springframework.security:spring-security-test'
// spring data jdbc, oracle, log4jdbc
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'com.oracle.database.jdbc:ojdbc11'
implementation 'org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4:1.16'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
// thymeleaf
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect'
// spring security
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
// OAuth2
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
// mark down
implementation 'org.commonmark:commonmark:0.21.0'
// mybatis
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.3'
}
tasks.named('test') {
useJUnitPlatform()
}
tasks.withType(JavaCompile) {
options.compilerArgs << '-parameters'
}
def reactDir = "$projectDir/src/main/map"
sourceSets {
main {
resources { srcDirs = ["$projectDir/src/main/resources"]
}
}
}
processResources { dependsOn "copyReactBuildResourceFiles", "copyReactBuildHtmlFiles" }
task installReact(type: Exec) {
workingDir "$reactDir"
inputs.dir "$reactDir"
group = BasePlugin.BUILD_GROUP
// PATH 정보를 명시적으로 전달
// Github Action Runner에서 npm 명령어 실행할 때 PATH를 전달해줘야 작동함.
environment "PATH", System.getenv("PATH")
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine 'npm.cmd', 'install', '--legacy-peer-deps'
} else {
commandLine 'npm', 'install', '--legacy-peer-deps'
}
}
task buildReact(type: Exec) {
dependsOn "installReact"
workingDir "$reactDir"
inputs.dir "$reactDir"
group = BasePlugin.BUILD_GROUP
// PATH 정보를 명시적으로 전달
environment "PATH", System.getenv("PATH")
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine 'npm.cmd', 'run', 'build'
} else {
commandLine 'npm', 'run', 'build'
}
}
task copyReactBuildResourceFiles(type: Copy) {
dependsOn "buildReact"
from "$reactDir/build/"
exclude '**/*.html' // *.html 파일 제외
into "$projectDir/src/main/resources/static/map/"
}
task copyReactBuildHtmlFiles(type: Copy) {
dependsOn "buildReact"
from("$reactDir/build/") {
include '*.html' // *.html 파일만 포함
}
into "$projectDir/src/main/resources/templates/map/"
}