Skip to content

Instantly share code, notes, and snippets.

@grv87
Created October 16, 2017 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grv87/f9009c925e5d6f7ea1f09f391d837d70 to your computer and use it in GitHub Desktop.
Save grv87/f9009c925e5d6f7ea1f09f391d837d70 to your computer and use it in GitHub Desktop.
Task execution isn't idempotent on task's commandLine
plugins {
id 'com.github.jlouns.cpe' version '0.5.0'
}
ext.testCmd = {
println tasks['test.cpe'].commandLine
}
task('test1') {
doLast() { testCmd() }
}
task('test.cpe', type: CrossPlatformExec) {
dependsOn 'test1'
commandLine(['bundle', '--version'])
}
task('test2') {
dependsOn 'test.cpe'
doLast() { testCmd() }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment