add strategy to get gradle commitid from release branch in non gradle builds.