Closed arpsmack closed 1 year ago
Hi @arpsmack,
Thank you for the hint. I have fixed it and will prepare a new release in the next days.
@arpsmack Could you check if v0.6.0 fixes you problem?
@comahe-de Yep, just checked, it's fixed in 0.6.0. Thanks!
See https://github.com/comahe-de/i18n4k/blob/master/i18n4k-gradle-plugin/src/main/kotlin/de/comahe/i18n4k/gradle/plugin/I18n4kPlugin.kt#L159-L163
It grabs a copy of all the existing source folders, adds the new one, and then calls
srcDirs
which adds all the directories to the source set. This creates a list that looks like:Unfortunately it's a bit hard to see that this is happening since a lot of the gradle APIs use Sets and the duplicates often get filtered out, but when the
processResources
task runs, it definitely ends up trying to copy all your resources twice, leading to build errors (or a ton of warnings if you setduplicatesStrategy = DuplicatesStrategy.WARN
).A simple workaround is either to set
duplicatesStrategy
and accept that your build will print a bunch of warnings, or to add this to yourprocessResources
task (Kotlin DSL syntax):s.srcDirs
returns a Set of files so it removes the duplicates for you.