Exception in moeMainStartupProvider (possibly due to external signed JARs?)

I’m trying to build an app that uses an external JAR file that is signed, i.e. contains META-INF folder with MANIFEST.MF etc.

I get this error during moeMainStartupProvider execution:

Execution failed for task ‘:moeMainStartupProvider’.
Invalid signature file digest for Manifest main attributes

With callstack leading to

org.moe.gradle.tasks.StartupProvider.lambda$null$158(StartupProvider.java:97)
org.moe.gradle.tasks.StartupProvider.lambda$run$159(StartupProvider.java:91)
org.moe.gradle.tasks.StartupProvider.run(StartupProvider.java:83)
org.moe.gradle.tasks.AbstractBaseTask.runInternal(AbstractBaseTask.java:105)

StartupProvider.log contains only string

Checking: F:\MuOS_test\build\moe\main\proguard\output.jar

Which makes me assume the task fails when checking this file. The reason, it seems, is that the build process merged META-INF folder from that other JAR into my output.jar.

What should I do here? I see an example in ProGuard docs that shows how to strip unneeded manifests, but since ProGuard file is generated by MOE, I can’t make it work without modifying the source of the plug-in.

Try this one and see if it helps. You may exclude more files if you need.

Thank you, this solution worked.