We face the same problem and managed to solve this by adding these code in build.gradle:
moeMainProGuard {
doLast {
def jar = getOutJar()
def outputDir = file(jar.getAbsolutePath() + "_")
copy{
from(zipTree(jar)){
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
into outputDir
}
delete jar
ant.jar(update: "true", index: "true", destfile: jar.getAbsolutePath()) {
fileset(dir: outputDir)
}
delete outputDir
}
}
basically is deleting certs during build.