I’ve encountered a dreaded error duplicate files during packaging of apk problem. I.e. gradle android plugin tries to combine files from all dependencies into a single archive and fails if there are files with the same names at the same paths at different dependency files.
Unfortunately, the android plugin is closed source (at least I was not able to find its sources at the net), that’s why it’s not possible to explicitly check the processing there. However, I have a strong assumption that it does relate to standard gradle facilities for the task of extracting dependency files and building an archive from them. That makes me think that it might be possible to intercept that calls (define own ‘interceptor closure’ for the target methods) which performs necessary cleanup (adds a property to ignore duplicate files OR apply a filter for the dependency content files with a manually provided list of files to ignore during processing).
Any ideas on what standard gradle classes/methods should be tried to be instrumented that way?