Struggling to build Griefdefender

I have just tried building from scatch again on my PC. I got it to build and wrote down what I did step by step. So here you go

How to build

Requirements

Steps

  • Open a terminal (CMD on windows)
  • Navigate to a new folder
  • run git clone --recurse-submodules https://github.com/bloodmc/GriefDefender.git
    cd GriefDefender
  • removed include "bukkit" from settings.gradle file (This file can be opened in notepad)
  • open the sponge folder and create a new folder called libs (case sensitive)
  • Place MCClans inside that libs folder ( Release 1.6 Sponge 1.12.2 API 7 · HexagonMC/mcclans-core-sponge · GitHub )
  • Place PlaceholderAPI inside that libs folder ( rojo8399 / PlaceholderAPI )
  • java -version to ensure Java 8 is the main (depending on your exact version of java, it maybe --version instead → This is to ensure your Java 8 isnt just installed, but the primary Java version)
  • Go back to the terminal and run cd GriefDefenderAPI
  • Then run "gradlew" build
  • Then run cd ..
  • Then run "gradlew" build
  • find compiled jars in ./sponge/build/libs/

Edit

Worldedit has a toder tantrum with urls.

Heres a fix:

In the build.gradle file in the sponge folder. Remove lines 134, 97-100 and 61-64

Then download the latest world edit for api 7 from ore and place it in the libs folder

Edit 2:

Nucleus can no longer be downloaded properly resulting in a crash of missing nucleus.

Here is a fix

In the build.gradle file in the sponge folder. Remove lines 129-131. It should be

compileOnly ("io.github.nucleuspowered:nucleus-api:1.14.1-S7.1"){
        exclude module: 'spongeapi'
    }

Then add Nucleus 1.14.1 to the libs folder

Edit 3:

Grief Defender uses the old repo for sponge. You will want to change this (apply between steps 3 and 9)

  • go into the sponge folder and open build.gradle
  • go to line 75. It should look like
maven {
        name = 'sponge'
        url = 'https://repo.spongepowered.org/maven/'
    }
  • change the url to https://repo.spongepowered.org/repository/maven-public/