title: How to declare / change Java variables via gradle script
body: <p>Is it possible to declare or change Java variables accessible via code with gradle?</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/17197636/is-it-possible-to-declare-a-variable-in-gradle-usable-in-java">Is it possible to declare a variable in Gradle usable in Java?</a> and it tells me how to declare variables accessible via Java code for Android projects.</p>
  
  <p>Is it possible to do the same with "normal" Java projects? I want to set a variable depending on which task is executed.</p>
  
  <p>Thanks for your help!</p>