title: gradle: no repositories are defined
body: <p>I'm new to gradle.
  I fetched an old gradle based project on a new computer, and when I tried to build it, it failed with "<code>Could not determine java version from '11'.</code>". I updated the gradle version to 5.0, using <code>gradlew wrapper --gradle-version 5.0</code> (from a recent system wide gradle installation). And now any gradle command fails with:</p>
  
  <pre><code>&gt; Configure project :
  Cannot resolve reloading agent JAR: Failed to resolve imported Maven boms: Cannot resolve external dependency org.springframework.boot:spring-boot-starter-parent:1.5.12.RELEASE because no repositories are defined.
  </code></pre>
  
  <p>In my build.gradle, a repository is defined, so I don't understand the error:</p>
  
  <pre><code>buildscript {
          repositories {
                  jcenter()
                  mavenLocal()
                  maven { url "https://repo.grails.org/grails/core" }
          }
          dependencies {
                 ...
          }
  }
  
  repositories {
          mavenLocal()
          maven { url "https://repo.grails.org/grails/core" }
  }
  </code></pre>