title: Gradle Spring Boot Devtools: developmentOnly and runtimeClasspath
body: <p>I am puzzled by this block of code to be used in a <code>gradle</code> file, suggested by <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/using-spring-boot.html#using-boot-devtools" rel="noreferrer">Spring Boot Documentation on Developer Tools</a></p>
  
  <pre><code>configurations {
      developmentOnly
      runtimeClasspath {
          extendsFrom developmentOnly
      }
  }
  dependencies {
      developmentOnly("org.springframework.boot:spring-boot-devtools")
  }
  </code></pre>
  
  <p>I think I must declare the <code>developmentOnly</code> configuration because it is to be used in the <code>dependencies {}</code> block, but why do I need the lines for <code>runtimeClasspath</code>?  I actually tried removing the lines in my project and the project built prefectly fine.  </p>
  
  <pre><code>configurations {
      developmentOnly
  }
  dependencies {
      developmentOnly("org.springframework.boot:spring-boot-devtools")
  }
  </code></pre>
  
  <p>Is <code>runtimeClasspath</code> used by the Java Plugin? (As suggested by this <a href="https://docs.gradle.org/current/userguide/java_plugin.html" rel="noreferrer">doc</a>)  Will there be any bad side-effect if I do not include those lines for <code>runtimeClasspath</code>?</p>
  
  <p><strong>Update (2019-12-10)</strong></p>
  
  <p>I can also confirm that the built executable jar built without the <code>runtimeClasspath</code> directive ran prefectly okay.  So I really don't know what that directive is doing.</p>