Forward port of issue #39148 to 3.2.x.

Comment From: wilkinsona

We're going to revert this change in 3.1.x and 3.2.x as it's not as internal as we'd hoped. For example, @onobc had to modify has build to accommodate the upgrade due to a version clash with an Artifactory-related dependency in project's buildSrc