Построение Uberjar с Gradle

Я новичок в Gradle. Я хочу построить Uberjar (AKA FATJAR), который включает в себя все переходные зависимости проекта. Какие строки мне нужно добавить в мой & quot; build.gradle & quot ;?

Это то, что у меня сейчас есть: (я скопировал его где-то несколько дней назад, но не помню откуда.)

task uberjar(type: Jar) {
    from files(sourceSets.main.output.classesDir)

    manifest {
        attributes 'Implementation-Title': 'Foobar',
                'Implementation-Version': version,
                'Built-By': System.getProperty('user.name'),
                'Built-Date': new Date(),
                'Built-JDK': System.getProperty('java.version'),
                'Main-Class': mainClassName
    }
}

Ответы на вопрос(4)

Ваш ответ на вопрос