Gradle-onejar is a project mainly written in JAVA and GROOVY, it's free.
OneJar task/plugin for gradle
See the example/build.gradle.