From 68de42c5aea800a488fa6509090f4c25a8e7b3e9 Mon Sep 17 00:00:00 2001 From: az Date: Wed, 28 Jul 2021 16:31:41 +0200 Subject: [PATCH] fix gradle error: Entry META-INF/versions/9/module-info.class is a duplicate but no duplicate handling strategy has been set. --- build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.gradle b/build.gradle index 1390f98..6dd3c14 100644 --- a/build.gradle +++ b/build.gradle @@ -75,6 +75,8 @@ task fatJar(type: Jar) { 'Main-Class': 'io.provs.entry.EntryKt' } archivesBaseName = project.name + '-all' + duplicatesStrategy(DuplicatesStrategy.EXCLUDE) + from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } with jar } @@ -84,6 +86,7 @@ task fatJarLatest(type: Jar) { doFirst { from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } } + duplicatesStrategy(DuplicatesStrategy.EXCLUDE) exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA' manifest { @@ -104,6 +107,7 @@ task uberJar(type: Jar) { from { configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) } } { + duplicatesStrategy(DuplicatesStrategy.EXCLUDE) exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA' } @@ -124,6 +128,7 @@ task uberJarLatest(type: Jar) { from { configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) } } { + duplicatesStrategy(DuplicatesStrategy.EXCLUDE) exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA' }