|
1 | 1 | import com.github.gradle.node.pnpm.task.PnpmTask |
2 | 2 |
|
3 | 3 | plugins { |
4 | | - id("com.github.node-gradle.node") |
| 4 | + id("com.github.node-gradle.node") |
5 | 5 | } |
6 | 6 |
|
7 | 7 | group = "com.hivemq" |
8 | 8 | description = "Frontend for HiveMQ Edge" |
9 | 9 |
|
10 | 10 | val buildFrontend by tasks.registering(PnpmTask::class) { |
11 | | - pnpmCommand.set(listOf("build", "--base=/app")) |
12 | | - dependsOn(tasks.pnpmInstall) |
13 | | - inputs.dir(project.fileTree("src")) |
14 | | - inputs.dir(project.fileTree("public")) |
15 | | - inputs.dir("node_modules") |
16 | | - inputs.files("index.html", ".env", "vite.config.ts", ".browserslistrc", "tsconfig.json", "tsconfig.node.json") |
17 | | - outputs.dir("${project.projectDir}/dist") |
| 11 | + pnpmCommand.set(listOf("build", "--base=/app")) |
| 12 | + dependsOn(tasks.pnpmInstall) |
| 13 | + inputs.dir(project.fileTree("src")) |
| 14 | + inputs.dir(project.fileTree("public")) |
| 15 | + inputs.dir("node_modules") |
| 16 | + inputs.files("index.html", ".env", "vite.config.ts", ".browserslistrc", "tsconfig.json", "tsconfig.node.json") |
| 17 | + outputs.dir("${project.projectDir}/dist") |
18 | 18 | } |
19 | 19 |
|
20 | 20 | /* ******************** artifacts ******************** */ |
21 | 21 |
|
22 | 22 | val releaseBinary: Configuration by configurations.creating { |
23 | | - isCanBeConsumed = true |
24 | | - isCanBeResolved = false |
25 | | - attributes { |
26 | | - attribute(Category.CATEGORY_ATTRIBUTE, objects.named("binary")) |
27 | | - attribute(Usage.USAGE_ATTRIBUTE, objects.named("release")) |
28 | | - } |
| 23 | + isCanBeConsumed = true |
| 24 | + isCanBeResolved = false |
| 25 | + attributes { |
| 26 | + attribute(Category.CATEGORY_ATTRIBUTE, objects.named("binary")) |
| 27 | + attribute(Usage.USAGE_ATTRIBUTE, objects.named("release")) |
| 28 | + } |
29 | 29 | } |
30 | 30 |
|
31 | 31 | artifacts { |
32 | | - add(releaseBinary.name, buildFrontend) |
| 32 | + add(releaseBinary.name, buildFrontend) |
33 | 33 | } |
34 | 34 |
|
35 | 35 | node { |
36 | | - download.set(true) |
| 36 | + download.set(true) |
| 37 | + version = "16.14.2" |
| 38 | + pnpmVersion = "8" |
37 | 39 | } |
0 commit comments