From 00051dbc0f935b8dd165b942e7156cb95e7f7275 Mon Sep 17 00:00:00 2001 From: gbrodman Date: Mon, 7 Aug 2023 11:10:25 -0400 Subject: [PATCH] Ignore/exclude IDEA-generated classpath index files (#2094) See https://youtrack.jetbrains.com/issue/IDEA-305759/Gradle-cannot-handle-classpath.index-duplicates for more info -- it looks like this is fixed in some recent versions but as of right now it doesn't seem like it's fixed on the Google-managed version --- .gitignore | 1 + java_common.gradle | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/.gitignore b/.gitignore index e88c60894..d37f397b0 100644 --- a/.gitignore +++ b/.gitignore @@ -79,6 +79,7 @@ autogenerated/ **/*.iml nomulus.ipr nomulus.iws +**/classpath.index # Auto-generated java classes by Intellij */src/main/generated/ diff --git a/java_common.gradle b/java_common.gradle index 3dfbbcb4a..70c77559c 100644 --- a/java_common.gradle +++ b/java_common.gradle @@ -193,3 +193,10 @@ jacocoTestCoverageVerification { } } } + +project.tasks.withType(Copy) { + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +} +project.tasks.withType(Jar) { + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +}