1+ // TODO Remove the buildscript block when the halo devtools plugin is updated to use ASM 9.5 or later.
2+ buildscript {
3+ dependencies {
4+ // force the version of ASM used by the halo devtools plugin
5+ classpath(' org.ow2.asm:asm:9.8' )
6+ classpath(' org.ow2.asm:asm-commons:9.8' )
7+ }
8+ }
9+
110plugins {
211 id ' java'
3- id " com.github.node-gradle.node" version " 5.0 .0"
4- id " io.freefair.lombok" version " 8.0 .1"
5- id " run.halo.plugin.devtools" version " 0.0.9 "
6- id ' org.openapi.generator' version ' 7.7 .0'
12+ id " com.github.node-gradle.node" version " 7.1 .0"
13+ id " io.freefair.lombok" version " 8.13 .1"
14+ id " run.halo.plugin.devtools" version " 0.5.0 "
15+ id ' org.openapi.generator' version ' 7.12 .0'
716}
817
918group ' run.halo.s3os'
1019
20+ tasks. withType(JavaCompile ). configureEach {
21+ options. encoding = ' UTF-8'
22+ options. release = 21
23+ }
24+
1125java {
12- sourceCompatibility = JavaVersion . VERSION_17
26+ toolchain {
27+ languageVersion = JavaLanguageVersion . of(21 )
28+ }
1329}
1430
1531repositories {
1632 mavenCentral()
17- maven { url ' https://s01.oss.sonatype.org/content/repositories/releases' }
18- maven { url ' https://s01.oss.sonatype.org/content/repositories/snapshots/' }
1933 maven { url ' https://repo.spring.io/milestone' }
2034}
2135
2236dependencies {
23- implementation platform(' run.halo.tools.platform:plugin:2.19 .0-SNAPSHOT ' )
37+ implementation platform(' run.halo.tools.platform:plugin:2.21 .0-alpha.1 ' )
2438 compileOnly ' run.halo.app:api'
2539
26- implementation platform(' software.amazon.awssdk:bom:2.19.8 ' )
27- implementation (' software.amazon.awssdk:s3' ) {
40+ implementation platform(' software.amazon.awssdk:bom:2.31.58 ' )
41+ implementation(' software.amazon.awssdk:s3' ) {
2842 exclude group : ' org.slf4j'
2943 exclude group : ' commons-logging'
3044 }
3145
3246 testImplementation ' run.halo.app:api'
3347 testImplementation ' org.springframework.boot:spring-boot-starter-test'
3448 testImplementation ' io.projectreactor:reactor-test'
49+ testRuntimeOnly ' org.junit.platform:junit-platform-launcher'
3550}
3651
3752configurations. runtimeClasspath {
@@ -40,7 +55,7 @@ configurations.runtimeClasspath {
4055
4156
4257halo {
43- version = ' 2.19 '
58+ version = ' 2.21.0-alpha.2 '
4459}
4560
4661haloPlugin {
@@ -59,21 +74,16 @@ node {
5974 nodeProjectDir = file(" ${ project.projectDir} /console" )
6075}
6176
62- task buildFrontend ( type : PnpmTask ) {
77+ tasks . register( ' buildFrontend ' , PnpmTask ) {
6378 args = [' build' ]
79+ dependsOn(tasks. named(' pnpmInstall' ))
6480}
6581
66- tasks. named(' buildFrontend' ) {
67- dependsOn ' pnpmInstall'
68- }
69-
70- build {
71- // build frontend before build
72- tasks. getByName(' compileJava' ). dependsOn(' buildFrontend' )
82+ tasks. named(' processResources' ) {
83+ dependsOn(tasks. named(' buildFrontend' ))
7384}
7485
75-
76- task downloadOpenApiSpec {
86+ tasks. register(' downloadOpenApiSpec' ) {
7787 doLast {
7888 def url = ' http://localhost:8090/v3/api-docs/plugin-s3'
7989 def file = layout. buildDirectory. dir(" apidocs/openapi.json" ). get(). asFile
@@ -87,11 +97,11 @@ openApiGenerate {
8797 inputSpec = layout. buildDirectory. dir(" apidocs/openapi.json" ). get(). asFile. getAbsolutePath()
8898 outputDir = " ${ projectDir} /console/src/api"
8999 additionalProperties = [
90- useES6 : true ,
100+ useES6 : true ,
91101 useSingleRequestParameter : true ,
92- withSeparateModelsAndApi : true ,
93- apiPackage : " api" ,
94- modelPackage : " models"
102+ withSeparateModelsAndApi : true ,
103+ apiPackage : " api" ,
104+ modelPackage : " models"
95105 ]
96106 typeMappings = [
97107 set : " Array"
0 commit comments