32 lines
654 B
Text
32 lines
654 B
Text
|
import com.github.gradle.node.npm.task.NpxTask
|
||
|
plugins {
|
||
|
id ("com.github.node-gradle.node") version "7.1.0"
|
||
|
}
|
||
|
|
||
|
val angularClient by configurations.creating {
|
||
|
isCanBeConsumed = false
|
||
|
}
|
||
|
|
||
|
dependencies {
|
||
|
angularClient(project(":angular-api-client", "angularClient"))
|
||
|
}
|
||
|
|
||
|
tasks.register<Copy>("getClient") {
|
||
|
from(angularClient)
|
||
|
into(layout.buildDirectory.dir("client"))
|
||
|
}
|
||
|
|
||
|
tasks.register<NpxTask>("build") {
|
||
|
dependsOn("npmInstall")
|
||
|
dependsOn("getClient")
|
||
|
command = "ng"
|
||
|
args.add("build")
|
||
|
}
|
||
|
|
||
|
tasks.register<NpxTask>("start") {
|
||
|
dependsOn("npmInstall")
|
||
|
dependsOn("getClient")
|
||
|
command = "ng"
|
||
|
args.add("start")
|
||
|
}
|