4.3.4.2.1. Adding Dependencies

If you need some dependencies to be loaded before application starts, you should add them to the build file on the top level using uberJar configuration. Additional logback appender may be a good example. Build file will look like this:

buildscript {
    //build script definitions
}
dependencies {
    //app components definitions
    uberJar ('net.logstash.logback:logstash-logback-encoder:6.3')
}
//modules and task definitions, etc.

When declared like this, the library logstash-logback-encoder will be unpacked and its packages and classes will be placed to the root of the uberJar artifact.