mirror of
https://github.com/halo-dev/plugin-s3.git
synced 2025-10-14 14:11:15 +00:00
101 lines
2.4 KiB
Groovy
101 lines
2.4 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id "com.github.node-gradle.node" version "7.1.0"
|
|
id "io.freefair.lombok" version "8.13.1"
|
|
id "run.halo.plugin.devtools" version "0.6.0"
|
|
id 'org.openapi.generator' version '7.12.0'
|
|
}
|
|
|
|
group 'run.halo.s3os'
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
options.encoding = 'UTF-8'
|
|
options.release = 21
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url 'https://repo.spring.io/milestone' }
|
|
}
|
|
|
|
dependencies {
|
|
implementation platform('run.halo.tools.platform:plugin:2.21.0-alpha.1')
|
|
compileOnly 'run.halo.app:api'
|
|
|
|
implementation platform('software.amazon.awssdk:bom:2.31.58')
|
|
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'
|
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
|
}
|
|
|
|
configurations.runtimeClasspath {
|
|
exclude group: 'org.reactivestreams', module: 'reactive-streams'
|
|
}
|
|
|
|
|
|
halo {
|
|
version = '2.21.0-alpha.2'
|
|
}
|
|
|
|
haloPlugin {
|
|
watchDomains {
|
|
consoleSource {
|
|
files files('console/src/')
|
|
}
|
|
}
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
node {
|
|
nodeProjectDir = file("${project.projectDir}/console")
|
|
}
|
|
|
|
tasks.register('buildFrontend', PnpmTask) {
|
|
args = ['build']
|
|
dependsOn(tasks.named('pnpmInstall'))
|
|
}
|
|
|
|
tasks.named('processResources') {
|
|
dependsOn(tasks.named('buildFrontend'))
|
|
}
|
|
|
|
tasks.register('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"
|
|
]
|
|
}
|