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