Seems like you're using Kotlin DSL in your build.gradle file.
So most likely the right code would be
minifyEnabled true
Instead of
isMinifyEnabled = true
Keep in mind that other properties might need to be renames as well.