title: Gradle 5: Failed to apply plugin [id 'aspectj']
body: <p>I am trying to run a build.gradle file that looks like this and which returns an error on line <em>apply plugin: 'aspectj'</em></p>
  
  <pre><code>buildscript {
      repositories {
          mavenLocal()
          mavenCentral()
          maven { url "http://repo.spring.io/release" }
          maven { url "http://repo.spring.io/snapshot" }
          maven { url "https://repo.spring.io/libs-snapshot" }
          maven { url "http://repo.spring.io/milestone" }
          maven { url "https://repo.spring.io/libs-milestone" }
          maven { url "https://maven.eveoh.nl/content/repositories/releases" }
      }
  
      dependencies {
          classpath "nl.eveoh:gradle-aspectj:2.0"
      }
  }
  apply plugin: 'aspectj'
  
  jar {
      manifest {
          attributes(
                  "Created-By": "Iuliana Cosmina",
                  "Specification-Title": "Pro Spring 5",
                  "Main-Class": "com.apress.prospring5.ch5.AspectJDemo",
                  "Class-Path": configurations.compile.collect { it.getName() }.join(' ')
          )
      }
  }
  </code></pre>
  
  <p>The error message is as follows: </p>
  
  <pre><code>FAILURE: Build failed with an exception.
  
  * Where:
  Build file '/home/me/Spring/pro-spring-5-master/chapter05/aspectj-aspects/build.gradle' line: 17
  
  * What went wrong:
  A problem occurred evaluating project ':chapter05:aspectj-aspects'.
  &gt; Failed to apply plugin [id 'aspectj']
     &gt; Could not find method deleteAllActions() for arguments [] on task ':chapter05:aspectj-aspects:compileJava' of type org.gradle.api.tasks.compile.JavaCompile.
  
  </code></pre>
  
  <p>What am I doing wrong here?</p>