Restructured project to version builds and move CSS into src.
* Added a new version implementation to the build. The build task now triggers an increment to the build version. * Reconfigured the war plugin to filter source files and replace the @version@ token with the project version and to rename css and js files to include the version number in the filename.
This commit is contained in:
33
shell.gradle
Normal file
33
shell.gradle
Normal file
@ -0,0 +1,33 @@
|
||||
// ## Utility methods for working with processes.
|
||||
|
||||
def shell_(List<String> cmd) { shell(cmd, null, false) }
|
||||
def shell_(String... cmd) { shell(cmd, null, false) }
|
||||
def shell(String... cmd) { shell(cmd, null, true) }
|
||||
|
||||
def shell(List<String> cmd, File workingDir, boolean checkExit) {
|
||||
shell(cmd as String[], workingDir, checkExit) }
|
||||
|
||||
def shell(String[] cmd, File workingDir, boolean checkExit) {
|
||||
def pb = new ProcessBuilder(cmd)
|
||||
if (workingDir) pb.directory(workingDir)
|
||||
def process = pb.start()
|
||||
process.waitForProcessOutput(System.out, System.err)
|
||||
|
||||
if (process.exitValue() != 0)
|
||||
println "Command $cmd exited with non-zero result code."
|
||||
if (checkExit) assert process.exitValue() == 0 : "Not ignoring failed command." }
|
||||
|
||||
def shell(List<List<String>> cmds, File workingDir) {
|
||||
cmds.each {
|
||||
ProcessBuilder pb = new ProcessBuilder(it)
|
||||
pb.directory(workingDir)
|
||||
pb.start().waitForProcessOutput(System.out, System.err) } }
|
||||
|
||||
def spawn(String... cmd) { spawn(cmd, null) }
|
||||
def spawn(List<String> cmd, File workingDir) { spawn(cmd as String[], workingDir) }
|
||||
def spawn(String[] cmd, File workingDir) {
|
||||
def pb = new ProcessBuilder(cmd)
|
||||
if (workingDir) pb.directory(workingDir)
|
||||
def process = pb.start() }
|
||||
|
||||
|
Reference in New Issue
Block a user