1

For a project I have a set of old .properties files, some are templates with ${placerholder} values and some are the "real" properties files that have key-value settings. Depending on the start parameter, the .properties template files have to be filled with the real values. The placeholder can be written with one or more dot annotations such as ${acount.money.euro} etc.

I cant seem to find a gradle way of filling those properties if:

  • the value is missing or should just be empty or have the placeholder
  • the value is written in dot annotation

I can do it in ANT but cant find a way to do it in gradle. Either the value cant be found for the dot annotations or the values are not filled at all or the missing value for the placeholder is making the script crash.

Anyone knows the right way to configurate .properties in gradle style? There are no real tutorials for it.

AKM
  • 31
  • 5

1 Answers1

-1

Did you try to use ant task? or write a custom task or a groovy class? or search on stack overflow? at least google? there are millions of answers on this, its one of the most common questions I think.

What do you mean:

There are no real tutorials for it.

Please check those links, try something show us your effort and then come back if you are stuck.

How can I transform a .properties file during a Gradle build?

Different ways to set properties

Gradle write properties

Groovy Reading a writing to properties file

and on, and on, and on....

LazerBanana
  • 6,865
  • 3
  • 28
  • 47