This has been fixed as of 1.33: https://plugins.jenkins.io/gradle#user-content-capturing-build-scans-from-jenkins-pipeline