Use stage instead of dist to skip unzipping

This commit is contained in:
Gary Huang 2019-01-03 12:16:06 -05:00
parent 071a545403
commit e66f91cb49
No known key found for this signature in database
GPG Key ID: 0CB168EE6C6844B7
1 changed files with 3 additions and 13 deletions

View File

@ -83,16 +83,6 @@ def randomOpenPort() {
}
}
task unzip(type: Copy) {
def zipFile = file("${buildDir}/distributions/playBinary.zip")
def outputDir = file("${buildDir}/unpacked/dist")
from zipTree(zipFile)
into outputDir
dependsOn 'dist'
}
task startServer(type: com.github.psxpaul.task.ExecFork) {
playHttpPort = randomOpenPort()
@ -100,7 +90,7 @@ task startServer(type: com.github.psxpaul.task.ExecFork) {
throw new GradleException("Failed to get random port to start Play")
}
workingDir = "${buildDir}/unpacked/dist/playBinary"
workingDir = "${buildDir}/stage/playBinary"
commandLine = "${workingDir}/bin/playBinary"
stopAfter = test
// these params tells the ExecFork plugin to block on startServer task until the port is opened or the string is seen in the ouput
@ -115,11 +105,11 @@ task startServer(type: com.github.psxpaul.task.ExecFork) {
+ " -Dhttp.address=127.0.0.1"
]
dependsOn unzip
dependsOn 'stage'
}
task deletePIDFile() {
delete "${buildDir}/unpacked/dist/playBinary/RUNNING_PID"
delete "${buildDir}/stage/playBinary/RUNNING_PID"
}
tasks.withType(Test) {