title: Cannot resolve external dependency org.springframework.boot:spring-boot-starter: because no repositories are defined
body: <p>I have a multibuild project and I am currently just setting it up. Each module naturally each has a <code>gradle.build</code> file that only contains the following:</p>
  
  <pre><code>dependencies {
  
  }
  </code></pre>
  
  <p>In the main <code>build.gradle</code> file I have want is needed for every module. However when I do a <code>gradle build</code> I get a error saying:</p>
  
  <blockquote>
    <p>Cannot resolve external dependency org.springframework.boot:spring-boot-starter: because no repositories
    are defined.   Required by:
          project :</p>
  </blockquote>
  
  <pre><code>apply plugin: 'java'
  apply plugin: 'maven'
  apply plugin: 'eclipse'
  apply plugin: 'idea'
  apply plugin: 'io.spring.dependency-management'
  
  version = '0.0.1-SNAPSHOT'
      sourceCompatibility = 1.8
  
  buildscript {
      ext {
          springBootVersion = '2.0.0.RELEASE'
      }
      repositories {
          mavenCentral()
      }
      dependencies {
  
          classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
      }
  }
  
  sourceSets.all { ext.purpose = null }
  
  // Everything in subprojects are applied to all modules
  subprojects {
  
      apply plugin: 'java'
      apply plugin: 'maven'
      apply plugin: 'eclipse'
      apply plugin: 'org.springframework.boot'
      apply plugin: 'io.spring.dependency-management'
  
      version = '0.0.1-SNAPSHOT'
  
  
      test {
          useTestNG()
          testLogging.showStandardStreams = true
  
          beforeTest { descriptor -&gt;
              logger.lifecycle("Running test: " + descriptor)
          }
  
          // listen to standard out and standard error of the test JVM(s)
          onOutput { descriptor, event -&gt;
              logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message )
          }
      }
  
      tasks.withType(JavaCompile) {
          options.encoding = 'UTF-8'
      }
  
      repositories {
          jcenter()
          mavenCentral()
          maven {
              url "https://plugins.gradle.org/m2/"
          }
      }
  
      dependencies {
          compile('org.springframework.boot:spring-boot-starter')
          testCompile('org.springframework.boot:spring-boot-starter-test')
      }
  
  }
  
  dependencies {
      compile('org.springframework.boot:spring-boot-starter')
      testCompile('org.springframework.boot:spring-boot-starter-test')
  }
  </code></pre>
  
  <p>Advice</p>