title: How to accept Gradle ToS for `build --scan` automatically and still manage to run build without a scan?
body: <blockquote>
    <p>I am using Gradle 4.6 which allows me to run <a href="https://scans.gradle.com/" rel="noreferrer">build scans</a> using
    the <code>--scan</code> option without having to explicitly apply or download
    extra plugins which is great. However this forces me to add the
    <code>buildScan</code> Terms of Service acceptance in my build.gradle file.</p>
  </blockquote>
  
  <p>like this:</p>
  
  <pre><code>buildScan {
      termsOfServiceUrl = 'https://gradle.com/terms-of-service'
      termsOfServiceAgree = 'yes'
  }
  </code></pre>
  
  <blockquote>
    <p>When I subsequently run <code>gradle build</code> without the <code>--scan</code> option I
    get the following error message:</p>
  
  <pre><code>&gt; Could not find method buildScan() for arguments…
  </code></pre>
    
    <p>I don’t want to have to modify the build.gradle file every time I
    want/dont want a scan. I don’t want to apply the plugin explicitly
    (firewall issues) and I don’t get the chance to accept the of Terms of
    Service on the command line which I have also seen documented.</p>
    
    <p>Can anyone tell me what I am doing wrong?</p>
  </blockquote>
  
  <p>This question is formatted like a quote because it was already asked on <a href="https://discuss.gradle.org/t/running-the-scan-option-with-gradle-4-6-without-changing-my-build-gradle/26238" rel="noreferrer">Gradle Forums</a>. But it's left without answer. I'm using Gradle 4.10.2 and the problem is still actual. I decided to draw more attention to this problem here.</p>