better use of kotlin DSL

This commit is contained in:
Aria Moradi 2021-05-20 10:24:33 +04:30
parent 10dee8b345
commit cf8e274883

View File

@ -6,15 +6,15 @@ node {
nodeProjectDir.set(file("${project.projectDir}/react/"))
}
tasks.named("yarn_build") {
dependsOn("yarn") // install node_modules
}
tasks {
register<Copy>("copyBuild") {
from(file("${node.nodeProjectDir}/build"))
into(file("$rootDir/server/src/main/resources/react"))
tasks.register<Copy>("copyBuild") {
from(file("$rootDir/webUI/react/build"))
into(file("$rootDir/server/src/main/resources/react"))
}
dependsOn("yarn_build")
}
tasks.named("copyBuild") {
dependsOn("yarn_build")
}
named("yarn_build") {
dependsOn("yarn") // install node_modules
}
}