description = 'borgbutler-webapp'
|
|
task npmBuild(type: Exec) {
|
workingDir '.'
|
executable 'sh'
|
commandLine 'npm', 'run', 'build'
|
}
|
|
task packageWebApp(type: Zip) {
|
dependsOn npmBuild
|
baseName 'borgbutler-webapp'
|
extension 'jar'
|
destinationDir file("${projectDir}")
|
from('build') {
|
// optional path under which output will be visible in Java classpath, e.g. static resources path
|
into 'webapp'
|
}
|
doLast {
|
//println "**** projectDir=${projectDir}, buildDir=${buildDir}"
|
mkdir "${buildDir}/libs"
|
def jarFile = archiveFileName.get()
|
ant.move file: "${projectDir}/${jarFile}",
|
toDir: "${buildDir}/libs"
|
}
|
}
|
|
task(dist).dependsOn packageWebApp
|