Using proguard in java modules Android Studio

I'm attempting to use proguard in a build.gradle file for a java module on Android Studio and I need to ofuscate the resulting source code but when I use proguard as I used to in other projects the build task fails. Below I show what I've trying to do and the error: