Solved Gralde can't find method compileOnly()

Discussion in 'Spigot Plugin Help' started by WolfHybrid23, Jan 22, 2020.

  1. Hi I am having an issue. So, I am trying to setup an Eclipse Gradle project with the spigot-api 1.15.1, and it's telling me that compileOnly isn't a thing...

    My gradle version is 5.6.1 and here is there error I am getting:

    Code (Text):
    Could not run phased build action using Gradle distribution ''.
    Build file 'C:\Users\Pmatt\Documents\Plugins\TerrainControl2\build.gradle' line: 14
    A problem occurred evaluating root project 'TerrainControl2'.
    Could not find method compileOnly() for arguments [org.spigotmc:spigot-api:1.15.1-R0.1-SNAPSHOT] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
    Here is the section creating the error. I have no idea what's wrong.

    Code (Text):
    dependencies {
        compileOnly 'org.spigotmc:spigot-api:1.15.1-R0.1-SNAPSHOT'
  2. I decided to create a new gradle project in eclipse to see if that would work and it did. Odd.