Really check GRADLE_OFFLINE (#81954)
Without "$", the condition is a literal string and always true.
I've found this using https://github.com/koalaman/shellcheck
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81954
Approved by: https://github.com/linbinyu