aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/frontend/build.gradle.kts
blob: 49d8dbd88f3c0e8ec058e1ad4d02a0cecf71bdc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
plugins {
    id("com.github.node-gradle.node") version "2.2.4"
}

node {
    version = "12.18.2"
    download = true
}

val npmRunBuild = tasks.getByName("npm_run_build") {
    inputs.dir(file("src/main"))
    inputs.files(file("package.json"), file("webpack.config.js"))
    outputs.dir(file("dist/"))
    outputs.cacheIf { true }
}

task("generateFrontendFiles") {
    dependsOn(npmRunBuild)
}

tasks {
    clean {
        delete(file("node_modules"), file("dist"))
    }
}