# Difficulties with processResources expansion

**URL:** <https://discuss.gradle.org/t/difficulties-with-processresources-expansion/27939>\
**Category:** Help/Discuss\
**Created:** [July 27, 2018, 8:40pm UTC](https://discuss.gradle.org/t/difficulties-with-processresources-expansion/27939 "2018-07-27T20:40:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SchlauFuchs](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/schlaufuchs/32/7107_2.png) [@SchlauFuchs](https://discuss.gradle.org/u/SchlauFuchs)\
**Post date:** [July 27, 2018, 8:40pm UTC](https://discuss.gradle.org/t/difficulties-with-processresources-expansion/27939/1 "2018-07-27T20:40:15Z")

</div>

Hi,

I am using Gradle 4.9 for a pretty fresh project using spring-boot. I wanted to expand a property in my src/main/resources/application.properties file, namely the project.version property.

I am still a learner around Gradle, but there are examples around that should help (I thought).  
so I tried first

```
processResources {
    expand project.properties
}

```

But that failed because some files contain dollar-curly-braces notation that must not be treated by expansion, and Gradle SimpleTemplateEngine failed on them. Then I tried to be more specific:

```
processResources {
  def props = ["version":version]
  filesMatching ('**/application.properties') {
    expand props
  }
}

```

This does not longer throw an exception in Gradle, but later in Spring-Boot, because it cannot resolve the ${version} value of the project.version property in application.properties - This looks like the filesMatching clause does not catch the file, it goes into build folders unprocessed. I did not find any help yet on how to make property expansion more verbose, but maybe people can hint me if I made a syntax error or a wrong assumption somewhere?

Cheers,  
Kai

---

<div class="post-metadata">

**Author:** ![SchlauFuchs](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/schlaufuchs/32/7107_2.png) [@SchlauFuchs](https://discuss.gradle.org/u/SchlauFuchs)\
**Post date:** [July 29, 2018, 12:53am UTC](https://discuss.gradle.org/t/difficulties-with-processresources-expansion/27939/2 "2018-07-29T00:53:11Z")

</div>

solved. The expand did not work on the property because it was the last line of the property file and a CRLF was missing.

🤯

You know why I think Gradle is not mature for production? For issues like this one.

---

<div class="post-metadata">

**Author:** ![Lance](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/lance/32/787_2.png) [@Lance](https://discuss.gradle.org/u/Lance)\
**Post date:** [July 29, 2018, 7:18am UTC](https://discuss.gradle.org/t/difficulties-with-processresources-expansion/27939/3 "2018-07-29T07:18:56Z")

</div>

Sounds like you’ve found a bug. Any chance you could put together a minimal project which shows the problem? Perhaps with two property files where one has the CRLF and another does not?
