gradlehoconshadowjar

gradle shadowJar combine configuration files in HOCON format


How can I combine application.conf HOCON formatted files for lightbend/typesafe configuration when creating a fat jar using gradle with the shadow plugin?

I.e. there are > 1 module which provide an application.conf file which needs to be merged when creating a fat jar.

I would hope that something without additional code works i.e. that not a custom Transformer is required. There seems to exist one for XML, but not yet for HOCON.


Solution

  • I think something like this Merging multiple TypeSafe Config files and resolving only after they are all merged but I am afraid you need to change your code.