title: Cannot build gradle prroject with gradle --scan option
body: <p>I have problem with Gradle --scan option. I followed this tutorial: <a href="https://guides.gradle.org/creating-new-gradle-builds/?_ga=2.62865448.54080785.1533153183-1753091300.1533153183" rel="nofollow noreferrer">https://guides.gradle.org/creating-new-gradle-builds/?_ga=2.62865448.54080785.1533153183-1753091300.1533153183</a>, but unfortunately when I execute ./gradlew {some-task-name} --scan it fails. I try with ./gradlew --scan and it fails with the same exception. 
  The most simple way to reproduce it:
   1. Execute gradle init
   2. ./gradlew --scan (in the same folder)</p>
  
  <p>I cannot understand why gradle cannot find this plugin in its central repo. I use gradle 4.9</p>
  
  <p>The exception is the following:</p>
  
  <hr>
  
  <p>FAILURE: Build failed with an exception.</p>
  
  <ul>
  <li><p>Where:
  Auto-applied by using --scan</p></li>
  <li><p>What went wrong:
  Plugin [id: 'com.gradle.build-scan', version: '1.15.1', artifact: 'com.gradle:build-scan-plugin:1.15.1'] was not found in any of the following sources:</p></li>
  <li><p>Gradle Core Plugins (plugin is not in 'org.gradle' namespace)</p></li>
  <li><p>Plugin Repositories (could not resolve plugin artifact 'com.gradle:build-scan-plugin:1.15.1')
  Searched in the following repositories:
  Gradle Central Plugin Repository</p></li>
  <li><p>Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.</p></li>
  <li><p>Get more help at <a href="https://help.gradle.org" rel="nofollow noreferrer">https://help.gradle.org</a></p></li>
  </ul>
  
  <p>BUILD FAILED in 0s</p>
  
  <hr>
  
  <p>Do not hesitate to ask for additional details.
  Thanks in advance for your attention.</p>
  
  <p>P.S. I attach file containing the output of ./gradlew --scan --debug</p>
  
  <p><a href="https://ufile.io/vrc9o" rel="nofollow noreferrer">result.txt</a></p>