JAVA-18813 : Update Creating a Fat Jar in Gradle (#15030)

This commit is contained in:
Alvin Austria 2023-10-24 10:48:34 +02:00 committed by GitHub
parent ee407c2cd8
commit 7dd0b41342
1 changed files with 5 additions and 3 deletions

View File

@ -8,8 +8,10 @@ buildscript {
}
}
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'java'
}
repositories {
mavenCentral()
@ -30,7 +32,7 @@ task customFatJar(type: Jar) {
manifest {
attributes 'Main-Class': 'com.baeldung.fatjar.Application'
}
baseName = 'all-in-one-jar'
archiveBaseName = 'all-in-one-jar'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
with jar