Removed unnecessary code duplication in build.gradle