In my case, I have placed proguard-android.txt file inside platforms\android. Add your rules for obfuscation as per requirement. Add below lines in your build.gradle file:
This works fine and obfuscates my src files. However, the drawback is that I am unable to avoid obfuscation of files present in the assets directory due to which my application crashes.
Also, the solution you mentioned about uncommenting the lines is applicable for eclipse projects (Not sure).