5

I have an application installed via distZip (gradle application plugin). It has the bin and lib folders. Now where do I place the config files? Like logback.xml or application.properties, etc? Or do I need to somehow tell the plugin where are the files?

acsadam0404
  • 2,711
  • 1
  • 26
  • 36

1 Answers1

5

When using Gradle's Application plugin, any additional files or folders you want to include the in distribution should be placed in src/dist

You can refer to 45.1.1. The distribution in the gradle manual. (https://docs.gradle.org/current/userguide/application_plugin.html)

Such as if you wanted a config directory to be part of your application distribution you could layout your project like so:

ExampleApplication/
└── src
    └── dist
        └── config
            └── logback.xml

Then when your distribution was created it would have a config directory at the top level containing logback.xml

If this directory structure presents an issue for your project, you can also manually add files and folders like so:

applicationDistribution.from('config') {
    into "config"
}
mcarlin
  • 1,571
  • 1
  • 11
  • 16