31 lines
654 B
Kotlin
31 lines
654 B
Kotlin
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("serve")
|
|
}
|