title: Java - difference between apply plugin vs plugins
body: <p>From what I've read so far, plugins {} seems to be the way to apply plugins for later Gradle versions where apply plugin: 'name' is the legacy way and we are encouraged to not use it anymore where possible.</p>
  
  <p>However, in my IntelliJ Gradle project, I tried to import Lombok and SpringBoot as below:</p>
  
  <pre><code>plugins {
      id 'java'
      id 'org.springframework.boot' version '2.0.4.RELEASE'
      id 'net.ltgt.apt' version '0.10'
  }
  
  dependencies {
      compile 'org.springframework.boot:spring-boot-starter-web'
      compile 'com.github.javadev:underscore:1.35'
      compileOnly 'org.projectlombok:lombok:1.18.2'
      apt "org.projectlombok:lombok:1.18.2"
  }
  </code></pre>
  
  <p>It won't work at all and no packages are added to the External Libraries. So, I had to add the code below in build.gradle for it to work:</p>
  
  <pre><code>apply plugin: 'io.spring.dependency-management'
  apply plugin: 'nebula.provided-base'
  </code></pre>
  
  <p>Is this the right way to go or am I missing something very important?</p>