Skip to content

Commit 5a5d657

Browse files
committed
Fix build.gradle
Signed-off-by: Ryan Wang <[email protected]>
1 parent 8921c84 commit 5a5d657

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

build.gradle

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id 'java'
33
id "io.freefair.lombok" version "8.0.1"
4-
id "com.github.node-gradle.node" version "5.0.0"
4+
id "com.github.node-gradle.node" version "7.0.2"
55
id "run.halo.plugin.devtools" version "0.0.7"
66
}
77

@@ -31,13 +31,20 @@ node {
3131
nodeProjectDir = file("${project.projectDir}")
3232
}
3333

34-
task buildFrontend(type: PnpmTask) {
34+
tasks.register('buildFrontend', PnpmTask) {
3535
args = ['build:packages']
36+
dependsOn('installDepsForUI')
37+
}
38+
39+
tasks.register('installDepsForUI', PnpmTask) {
40+
args = ['install']
3641
}
3742

3843
build {
3944
// build frontend before build
40-
tasks.getByName('compileJava').dependsOn('buildFrontend')
45+
tasks.named('compileJava').configure {
46+
dependsOn('buildFrontend')
47+
}
4148
}
4249

4350
halo {

0 commit comments

Comments
 (0)