title: gradle compileJava error: package org.junit.jupiter.api does not exist
body: <p>I can't manage to use gradle to get JUnit5 tests to work, compileJava failes with a message that it can't find org.junit.jupiter.api, despite me having put it in the dependencies.</p>
  
  <p>I have to compile some code that was give to me. It has a directory structure like this:</p>
  
  <pre><code>├── build.gradle
  ├── src
  │   ├── frame
  │   │   ├── CardTestfileReader.java
  │   │   ├── PublicTests.java
  │   │   └── SortArray.java
  │   └── lab
  │       ├── Card.java
  │       ├── HybridSort.java
  │       ├── HybridSortRandomPivot.java
  │       └── YourTests.java
  └── tests
      └── public
          ├── TestFile1
          ├── TestFile2
          └── TestFile3
  </code></pre>
  
  <p>The JUnit5 tests are in frame.PublicTests, I need to run those. </p>
  
  <p>I managed to copypasta this <code>build.groovy</code> file without really understanding what it is doing.</p>
  
  <pre><code>plugins {
    id 'java'
    id 'checkstyle'
  }
  
  repositories {
    mavenCentral()
  }
  
  dependencies {
    testCompile('org.junit.jupiter:junit-jupiter:5.4.2')
    testImplementation('org.junit.jupiter:junit-jupiter:5.4.2')
  }
  
  test {
    useJUnitPlatform()
    testLogging {
      events "passed", "skipped", "failed"
    }
  }
  
  sourceSets {
    main {
      java {
        srcDir 'src'
      }
    }
  
    test {
      java {
        srcDir 'src'
      }
    }
  }
  </code></pre>
  
  <p>I'm hoping to get <code>gradle test</code> to work and run the unit tests somehow.</p>