[JAVA-9046] Fix build for Gradle 7.x
This commit is contained in:
parent
2d9171f3a6
commit
9bd85df194
|
@ -3,7 +3,7 @@ buildscript {
|
|||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
|
||||
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.3'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ jar {
|
|||
}
|
||||
|
||||
from {
|
||||
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
|
||||
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,12 +30,13 @@ task customFatJar(type: Jar) {
|
|||
attributes 'Main-Class': 'com.baeldung.fatjar.Application'
|
||||
}
|
||||
baseName = 'all-in-one-jar'
|
||||
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||
with jar
|
||||
}
|
||||
|
||||
|
||||
dependencies{
|
||||
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
|
||||
compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
|
||||
}
|
||||
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
|
||||
implementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
rootProject.name = 'gradle-fat-jar'
|
Loading…
Reference in New Issue