During the migration from Gradle 6.x to Gradle 8.x, I encountered an issue where Gradle automatically appended “_1” to resource files with the same name but located in different directories. I am using JetBrains IntelliJ IDE and gradle plugin to build the project.
I found a useful reference on GitHub. I tried the solution mentioned on that page, but unfortunately, it didn’t work. The most compelling solution appears to add the following in build.gradle:
rootProject.tasks.named("processResources") {
duplicatesStrategy = 'include'
}
However, this doesn’t prevent Gradle from renaming the resource file. Am I missing something? Any help would be greatly appreciated.