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?


package com.custommcplugins;

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 {

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


apply plugin: 'java'

repositories {
    maven {
        name = 'Sponge maven repo'
        url = ''

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 = ''

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 =).