title: gradle command line properties for subprojects
body: <p>I have a multiproject gradle build whose top level has the following:</p>
  
  <pre class="lang-groovy prettyprint-override"><code>subprojects {
    apply plugin: 'war'
    httpPort = hasProperty('jettyPort') ? jettyPort.toInteger() : 8080
  }
  </code></pre>
  
  <p>If I run from the command line <code>gradle -PjettyPort=9000 war</code> the call to <code>hasProperty</code> returns <code>null</code>, but if I move the <code>hasProperty</code> check outside the <code>subprojects</code> closure, then it returns <code>true</code>.</p>
  
  <p>Is this the designed behavior or should I be able to access the properties from <code>subprojects</code> closure as I tried above.</p>