Trying to use $BITRISE_BUILD_NUMBER in my gradle but kept running into build fail

Any time :wink:

Btw if it works locally with the Bitrise CLI, then you should check this guide: How to debug your build locally / "It works on my Mac/PC but not on bitrise.io"

Mainly, you should do a clean git clone of the repo, as there can be a file in your current directory which is not under version control, and so is not available when bitrise.io clones the repo.