core/client/uikit/build.gradle

29 lines
696 B
Groovy
Raw Permalink Normal View History

2022-01-25 09:21:01 +00:00
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()
}