Struggling to build Griefdefender

https://maven.apache.org/install.html

Yep, it’s installed correctly and didn’t seem to work. Seems rather odd… Guess I’ll investigate gradle core plugins.

Did you exit your cmd and boot it back up after the install? It’s a issue with cmd

I did. I’ll try again though.

Also just seen I said gradle and not gradlew for the commands. Just updated the commands

Yeah I realized that myself and just tried it. Sponge failed so now to try common.

Edit: Time to clear out the gradle cache again I guess.

It literally embeds 5.6.4 for building it. Need to rip out the gradle version it’s using to get it to function.

Gradlew means “gradle wrapper”. The wrapper is the gradle version that comes with the project and ideally should be the one to use to build the code.

I do know however some developers never update the wrapper after creating the project. I have a feeling that Grief Defender is one of these. Therefore the command should be gradle

I will also suggest building the plugin in a IDE such as Inteliij as it allows you to keep track of a lot more things and control more though GUI instead of commands

Installing it now, any settings I should have? Like create associations?

No need to have anything special

Okay so I have intellij installed and the project imported. Not sure where to go from here.

On the right there should be a tab called “gradle” where you can double click on build

This will probably give the error that you got before. However you can click file > settings > search for gradle and then somewhere you can choose either use gradle wrapper or use specified gradle etc

Click the use your own gradle and then attempt to run build again

Edit:
I should be able to get on my laptop tomorrow so I’ll try to build it myself and document the steps I took

Still throwing out the Plugin [id: ‘maven’] error. "Build file ‘C:\Users\Darkrium\Desktop\GriefDefender\GriefDefender-master\common\build.gradle’ line: 2

Plugin [id: ‘maven’] was not found in any of the following sources:
"

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/

Thank you so much. This did in fact work! Where did you find that those libraries were required? Did I just miss something entirely?

When i was building it. I got the error message saying “class Clan could not be found with package X”. So I just googled the package (thinking it would show me a error report of the plugin to wit I could work out the plugin name) however instead, both have GitHub so it made it a lot easier on finding it.

As for your original issue (saying it needs gradle 7). I think you miss interpreted the warning message of “this gradle file contains deprecated lines that will no longer work in gradle 7+”. That’s basically saying it won’t work with gradle 7+ but your current version is fine

Hello, I was following your “How to build” and everything was working smoothly untill i reached the last “gradlew” build in GriefDefender. where i get tons of fails and issues Screenshot - afbe601d5789ec19393ca5206034e159 - Gyazo would you know how to fix this or am i stuck?

Your getting a 503 (http) error when getting the mappings for minecraft. If you want to go technical you could download these manually and then store them in the .m2 folder however this can get technical

The too technical didn’t read. Just need to wait for the server to come back so your able to download it

It looks like the website is back up and running so have another go

Im still getting a 503 when i try. Also getting the error below on the second to last step.

A problem occurred evaluating settings 'GriefDefender'.
> Could not get unknown property 'serootProject' for settings 'GriefDefender' of type org.gradle.initialization.DefaultSettings.

I removed the first line in the setings.gradle and that worked but not sure if correct. Then I got the 503.

@MoseMister