JAVA-18813 : Update Creating a Fat Jar in Gradle (#15030)
This commit is contained in:
parent
ee407c2cd8
commit
7dd0b41342
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue