title: Add Gradle properties to application.properties resource
body: <p>I have mutli-module Gradle application and I would to add properties which I've defined in <code>gradle.properties</code> to be available in <code>application.properties</code> of all my subprojects in <code>/src/main/resources</code> folder.</p>
  
  <p>What I've alread tried is adding <code>processResources</code> plugin to <code>subprojects</code> section.</p>
  
  <pre><code>subprojects {
  
      processResources {
          expand(project.properties)
      }
  // ...
  </code></pre>
  
  <p>As an example, I've defined the following property in <code>gradle.properties</code> file:</p>
  
  <pre><code>appVersion='0.0.1-SNAPSHOT'
  </code></pre>
  
  <p>Now, I want it to be present in <code>application.properties</code>, so I've added a placeholder as stated <a href="http://docs.spring.io/spring-boot/docs/current/reference/html/howto-properties-and-configuration.html" rel="nofollow">here</a>. So, my <code>application.properties</code> looks the following way:</p>
  
  <pre><code>app.version=${appVersion}
  </code></pre>
  
  <p>Later on, I would like to use it using <code>Spring</code>, e.g.:</p>
  
  <pre><code>@Value("${app.version}")
  </code></pre>
  
  <p>However, after the project is built, properties are not replaced, so I have no version value in <code>application.properties</code> and still <code>${appVersion}</code> placeholder. Any suggestions how to do that?</p>