title: Setting environment variables from Gradle
body: <p>I need to execute from Gradle an Ant script which relies on environment variables. 
  Ant uses <code>&lt;property environment="env"/&gt;</code> for it.</p>
  
  <p>I tried to do <code>env.foo="bar"</code> in Gradle, but it throws a Groovy exception.</p>
  
  <p>What is the proper way to pass environment variables from Gradle to Ant?</p>