Skip to content

Commit 545b7ac

Browse files
authored
Merge pull request #191 from halo-dev/chore/upgrade-infra
Update Gradle, dependencies, and workflow
2 parents 538c5f3 + 2603849 commit 545b7ac

File tree

8 files changed

+104
-65
lines changed

8 files changed

+104
-65
lines changed

.github/workflows/cd.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ on:
77

88
jobs:
99
cd:
10-
uses: halo-sigs/reusable-workflows/.github/workflows/plugin-cd.yaml@v1
10+
uses: halo-sigs/reusable-workflows/.github/workflows/plugin-cd.yaml@v3
1111
secrets:
12-
halo-username: ${{ secrets.HALO_USERNAME }}
13-
halo-password: ${{ secrets.HALO_PASSWORD }}
12+
halo-pat: ${{ secrets.HALO_PAT }}
1413
permissions:
1514
contents: write
1615
with:
1716
app-id: app-Qxhpp
17+
pnpm-version: 9
18+
node-version: 22
19+
java-version: 21

.github/workflows/ci.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@ on:
1010

1111
jobs:
1212
ci:
13-
uses: halo-sigs/reusable-workflows/.github/workflows/plugin-ci.yaml@v1
13+
uses: halo-sigs/reusable-workflows/.github/workflows/plugin-ci.yaml@v3
14+
with:
15+
pnpm-version: 9
16+
node-version: 22
17+
java-version: 21

build.gradle

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,52 @@
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+
110
plugins {
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

918
group 'run.halo.s3os'
1019

20+
tasks.withType(JavaCompile).configureEach {
21+
options.encoding = 'UTF-8'
22+
options.release = 21
23+
}
24+
1125
java {
12-
sourceCompatibility = JavaVersion.VERSION_17
26+
toolchain {
27+
languageVersion = JavaLanguageVersion.of(21)
28+
}
1329
}
1430

1531
repositories {
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

2236
dependencies {
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

3752
configurations.runtimeClasspath {
@@ -40,7 +55,7 @@ configurations.runtimeClasspath {
4055

4156

4257
halo {
43-
version = '2.19'
58+
version = '2.21.0-alpha.2'
4459
}
4560

4661
haloPlugin {
@@ -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"

console/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@
4646
"vitest": "^0.34.1",
4747
"vue-router": "^4.4.0",
4848
"vue-tsc": "^1.8.27"
49-
}
49+
},
50+
"packageManager": "pnpm@9.15.0+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c"
5051
}

gradle/wrapper/gradle-wrapper.jar

-15.7 KB
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME
7-
zipStorePath=wrapper/dists
7+
zipStorePath=wrapper/dists

gradlew

Lines changed: 32 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 23 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)