Fix gradle release branch detection