How is the zip created in the first place? Is it created by your gradle build? Or is it created externally?
If the zip is created inside your Gradle build there are opportunities to alter the zip before it’s created. If the zip is created exernally you could do something like:
task alterZip(type: Zip) {
from zipTree('path/to.zip').matching {
exclude 'somepath/replaceme.xml'
}
into('somepath') {
from 'overridepath/replaceme.xml'
}
}
You could make the above task more future proof by having a “smarter” exclude (ie exclude everything in the zip where a matching path exists in the override folder)