Copying Additional Files With Gradle Application Plugin

When building application distributions for Java apps you often need to bundle default configuration files, other resource, etc. into your application distribution. If you are using Gradle with Gradle Application Plugin for creating the application distribution for your project, you can use following code fragment in your Gradle project to copy addition files.

applicationDistribution.from("src/main/resources/conf") {
    into "conf"
}

Above code fragment copies content of conf directory into application distributions conf directory located in the root directory of your distribution.

 
72
Kudos
 
72
Kudos

Now read this

Good Reads: October 9th 2014

Mining of Massive Datasets - This is a very interesting book which covers many topics in Big Data including Map-Reduce, Recommendation Systems, Mining Social-Network Graphs, Dimensionality Reduction and Large-Scale Machine Learning. I am... Continue →