-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
133 lines (108 loc) · 3.43 KB
/
build.gradle
File metadata and controls
133 lines (108 loc) · 3.43 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
128
129
130
131
132
import com.vanniktech.maven.publish.SonatypeHost
plugins {
id 'java'
id "com.vanniktech.maven.publish" version "0.28.0"
id 'signing'
}
group = 'io.github.k6mt'
version = '0.0.1'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
repositories {
mavenCentral()
}
signing {
sign publishing.publications
}
mavenPublishing {
signAllPublications()
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
coordinates("io.github.k6mt", "test", "0.0.1")
// POM 설정
pom {
name = 'test'
description = 'SpringBoot test Library'
url = '<https://github.com/k6mt/test>'
licenses {
license {
name = "The Apache License, Version 2.0"
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
distribution = "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = 'jjoonior'
name = 'Injoo Huh'
email = 'jjoonior97@gmail.com'
}
}
scm {
connection = 'scm:git:github.com/k6mt/test.git'
developerConnection = 'scm:git:ssh://github.com/k6mt/test.git'
url = '<https://github.com/k6mt/test/tree/develop>'
}
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-aop:3.4.4'
implementation 'org.springframework.boot:spring-boot-starter-web:3.4.4'
implementation 'org.springframework.boot:spring-boot-starter-webflux:3.4.4'
implementation 'org.reflections:reflections:0.10.2'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'commons-io:commons-io:2.19.0'
implementation 'com.github.oshi:oshi-core:6.8.1'
implementation 'com.opencsv:opencsv:5.9'
implementation 'com.github.javaparser:javaparser-symbol-solver-core:3.26.4'
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0'
testImplementation 'org.assertj:assertj-core:3.25.3'
}
//build for frontend
def frontendDir = "$projectDir/frontend/surfer"
sourceSets {
main {
resources {
srcDirs = ["$projectDir/src/main/resources"]
}
}
}
processResources { dependsOn "copyBuildFiles" }
tasks.register("deleteCopiesFile", Delete) {
delete file("$projectDir/src/main/resources/META-INF/resources/k6m-surfer")
}
tasks.register('installReact', Exec) {
workingDir("$frontendDir")
inputs.dir("$frontendDir")
group = BasePlugin.BUILD_GROUP
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine "npm.cmd", "audit", "fix"
commandLine 'npm.cmd', 'install'
} else {
commandLine "npm", "audit", "fix"
commandLine "npm", "install"
}
}
tasks.register("buildReact", Exec) {
dependsOn("installReact")
workingDir("$frontendDir")
inputs.dir("$frontendDir")
group = BasePlugin.BUILD_GROUP
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine "npm.cmd", "run-script", "build"
} else {
commandLine "npm", "run-script", "build"
}
}
tasks.register("copyBuildFiles", Copy) {
dependsOn("deleteCopiesFile", "buildReact")
from("$frontendDir/dist")
into("$projectDir/src/main/resources/META-INF/resources/k6m-surfer")
}
afterEvaluate {
tasks.named("sourcesJar") {
dependsOn("copyBuildFiles")
}
}