title: How to set environment variables for gradle build from spring boot application.properties via command line?
body: <p>i want to be able to set environment variables during <strong>gradle build</strong>.</p>
  
  <p>Below is the <strong>application.properties</strong> in spring boot</p>
  
  <pre><code>spring.datasource.url=${host}
  spring.datasource.username=${username}
  spring.datasource.password=${password}
  </code></pre>
  
  <p>whe trying to build a jar i want to be able to set
  something like, <strong><code>gradle build -Dusername="user" -Dpassword="pwd" -Dhost="192.X.X.X"</code></strong></p>
  
  <p>How do i achieve in gradle?</p>