Gradle failed to build when proguard is activated

I’ve been battling this issue for the past few hours. Basically the proguard task will halt execution if there are any warnings. You can see the Proguard warnings, and the stacktrace, by adding -d to the build (as in: gradle clean assembleRelease -d). Note that the stacktrace mentions to “Please correct the above warnings first.”

In order to just get to a point where the build would get through proguard, I had to add -dontwarn entries for packages it was complaining about to my proguard-project.txt file. Something along the lines of:

-dontwarn org.apache.lang.**

…etc

So put simply… do as the stacktrace instructs you to do. Fix the warnings! 🙂

BTW, I apologize, as I now recognize that the stacktrace in the original post is not quite the same as the one I encountered. However, I do feel my answer is helpful, as obviously I ended up here trying to search for answers to my issue.

Leave a Comment