This gradle-plugin will do what's been described in the link below automatically
Just set it up like below with your /path/to/project_root_dir/build.gradle
buildscript {
repositories {
maven {
url "https://raw.githubusercontent.com/username4gh/repository/master/"
}
}
dependencies {
classpath 'com.kyokose.gradle:fatjar:{version}'
}
}