From ffa5b81a37b5a349366d6e3e98262e114afaca7a Mon Sep 17 00:00:00 2001 From: Shubham Goyal Date: Fri, 20 Oct 2023 15:01:46 -0500 Subject: [PATCH] Fix for jar tasks failure with error Encountered duplicate path META-INF/versions/9/module-info.class during copy operation --- build.gradle | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 97747eb8d..7551ba3ec 100644 --- a/build.gradle +++ b/build.gradle @@ -161,7 +161,7 @@ task cliJar(type: Jar, dependsOn: cliClasses) { attributes 'Main-Class': 'org.commcare.util.cli.CliMain' } duplicatesStrategy = DuplicatesStrategy.FAIL - filesMatching(["**/LICENSE.txt","**/NOTICE.txt"]) { + filesMatching(["**/LICENSE.txt","**/NOTICE.txt", "META-INF/**"]) { duplicatesStrategy = DuplicatesStrategy.INCLUDE } } @@ -176,7 +176,7 @@ task ccapiJar(type: Jar, dependsOn: ccapiClasses) { } } duplicatesStrategy = DuplicatesStrategy.FAIL - filesMatching(["**/LICENSE.txt","**/NOTICE.txt"]) { + filesMatching(["**/LICENSE.txt","**/NOTICE.txt", "META-INF/**"]) { duplicatesStrategy = DuplicatesStrategy.INCLUDE } } @@ -194,7 +194,7 @@ task harnessJar(type: Jar, dependsOn: translateClasses) { attributes 'Main-Class': 'org.javarosa.engine.Harness' } duplicatesStrategy = DuplicatesStrategy.FAIL - filesMatching(["**/LICENSE.txt","**/NOTICE.txt"]) { + filesMatching(["**/LICENSE.txt","**/NOTICE.txt", "META-INF/**"]) { duplicatesStrategy = DuplicatesStrategy.INCLUDE } } @@ -222,7 +222,7 @@ task formTranslateJar(type: Jar, dependsOn: translateClasses) { attributes 'Main-Class': 'org.javarosa.xform.schema.Harness' } duplicatesStrategy = DuplicatesStrategy.FAIL - filesMatching(["**/LICENSE.txt","**/NOTICE.txt", "**/org.xmlpull.v1.XmlPullParserFactory","org/xmlpull/v1/*"]) { + filesMatching(["**/LICENSE.txt","**/NOTICE.txt", "META-INF/**", "**/org.xmlpull.v1.XmlPullParserFactory","org/xmlpull/v1/*"]) { duplicatesStrategy = DuplicatesStrategy.INCLUDE } }