-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.gradle
99 lines (81 loc) · 2.33 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
plugins {
id 'java'
id "com.github.node-gradle.node" version "5.0.0"
id "io.freefair.lombok" version "8.0.1"
id "run.halo.plugin.devtools" version "0.0.9"
id 'org.openapi.generator' version '7.7.0'
}
group 'run.halo.s3os'
java {
sourceCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
maven { url 'https://s01.oss.sonatype.org/content/repositories/releases' }
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://repo.spring.io/milestone' }
}
dependencies {
implementation platform('run.halo.tools.platform:plugin:2.19.0-SNAPSHOT')
compileOnly 'run.halo.app:api'
implementation platform('software.amazon.awssdk:bom:2.19.8')
implementation ('software.amazon.awssdk:s3') {
exclude group: 'org.slf4j'
exclude group: 'commons-logging'
}
testImplementation 'run.halo.app:api'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.projectreactor:reactor-test'
}
configurations.runtimeClasspath {
exclude group: 'org.reactivestreams', module: 'reactive-streams'
}
halo {
version = '2.19'
}
haloPlugin {
watchDomains {
consoleSource {
files files('console/src/')
}
}
}
test {
useJUnitPlatform()
}
node {
nodeProjectDir = file("${project.projectDir}/console")
}
task buildFrontend(type: PnpmTask) {
args = ['build']
}
tasks.named('buildFrontend') {
dependsOn 'pnpmInstall'
}
build {
// build frontend before build
tasks.getByName('compileJava').dependsOn('buildFrontend')
}
task downloadOpenApiSpec {
doLast {
def url = 'http://localhost:8090/v3/api-docs/plugin-s3'
def file = layout.buildDirectory.dir("apidocs/openapi.json").get().asFile
file.parentFile.mkdirs()
file.text = new URL(url).text
}
}
openApiGenerate {
generatorName = "typescript-axios"
inputSpec = layout.buildDirectory.dir("apidocs/openapi.json").get().asFile.getAbsolutePath()
outputDir = "${projectDir}/console/src/api"
additionalProperties = [
useES6: true,
useSingleRequestParameter: true,
withSeparateModelsAndApi: true,
apiPackage: "api",
modelPackage: "models"
]
typeMappings = [
set: "Array"
]
}