core/client/uikit/build.gradle
2022-01-25 15:21:01 +06:00

29 lines
696 B
Groovy

task install(type: Exec) {
workingDir "$projectDir.absolutePath"
commandLine "npm", "i"
commandLine "yarn", "install"
}
String getArtifactsPath() {
return "$projectDir.absolutePath/artifacts/"
}
task clean() {
doLast {
new File(getArtifactsPath()).deleteDir()
}
}
task build(type: Exec, dependsOn: install) {
commandLine "yarn"
commandLine "yarn", "compile"
}
task makeArtifact(type: Copy) {
dependsOn(tasks.getByName("clean"))
dependsOn(tasks.getByName("build"))
from("$projectDir.absolutePath/dist/js/") { include "uikit.min.*" }
from("$projectDir.absolutePath/dist/css/") { include "uikit-core.min.*" }
into getArtifactsPath()
}