Error on Build

This is my first sponge plugin.

I am getting this when I run the Gradel build task:
Launching Gradle tasks failed due to an error in the referenced Gradle build.

Can anyone help?

Class:

package com.custommcplugins;

import org.spongepowered.api.entity.living.player.Player;
import org.spongepowered.api.event.Listener;
import org.spongepowered.api.event.block.InteractBlockEvent;
import org.spongepowered.api.event.filter.cause.First;
import org.spongepowered.api.plugin.Plugin;

@Plugin(id = "spongechests", name = "SpongeChests", version = "1.0")
public class SpongeChests {

	@Listener
	public void clickBlock(InteractBlockEvent e, @First Player p){
		//if(e.getCause().equals(Cause.))
		System.out.println("Cause: " + e.getCause());
		System.out.println("Player: " + p.getName());
	}
}

build.gradle:

apply plugin: 'java'

repositories {
    mavenCentral()
    maven {
        name = 'Sponge maven repo'
        url = 'http://repo.spongepowered.org/maven'
    }
}

dependencies {
	 compile 'org.spongepowered:spongeapi:6.0.0'
}

I’m not much of a Gradle person, but I believe it’s because name and url are not actions, they’re variables and thus need an assignment (someone can correct me on the proper terms if they wish). You should have something like:

name = 'sponge'
url = 'https://repo.spongepowered.org/maven'

I changed it like that, and it has the same error.

Either way works, actually.

Try adding group and version variables (these ones do need an =).