Dunno why I thought I needed "hasProperty"
But if I pass in -PprofilingEnabled=false, groovy would evaluate
project.profilingEnabled as true because the property is a string set
to "false"
In other words, in a conditional groovy evaluates "false" as true.
groovy> value = "false"
groovy> if (value){
groovy> println "true"
groovy> }
true
I think I need to do this:
if (project.properties.profilingEnabled == "true"){
runAEJvmArguments << "-agentlib:yjpagent"
}
Post by Luke DaleyPost by phil swensonif (project.hasProperty("profilingEnabled") && project.profilingEnabled) {
runAEJvmArguments << "-agentlib:yjpagent"
}
seems a bit verbose to me….
if (project.properties.profilingEnabled) {
runAEJvmArguments << "-agentlib:yjpagent"
}
--
Luke Daley
Principal Engineer, Gradleware
http://gradleware.com
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email