How to change Sponge version for Eclipse testing?

I’m using the GitHub client and a fork of SpongeForge. When I download it on the client it’s automatically the latest branch. How do I test in API 5.1?

I’d personally suggest just running a legit sponge jar file and building your plugins into the server run folder, but I’m almost certain there are some branches / tags you can checkout to.

For how much I test, that would waste a lot of time. I would have to export and do all the settings for that, then find the folder the server runs in my windows then launch it.
I like being able to just push a green play button :wink:

  • Go to the downloads page
  • choose the build you want to have
  • note down the latest commit(vanilla -> it says what commit it is directly on the download page, forge -> download the jar and look for text files, don’t know which one says which commit it is)
  • checkout the repo at this commit.

Edit: SpongeForge/SpongeVanilla repo HEAD to specific build

I tried that earlier, but when setting it up I get an error.

[code]FAILURE: Build failed with an exception.

  • Where:
    Build file ‘D:\Minecraft Plugins\Sponge Plugins\SpongeForge5\build.gradle’ line: 31

  • What went wrong:
    A problem occurred evaluating root project ‘SpongeForge’.

Could not read script ‘D:\Minecraft Plugins\Sponge Plugins\SpongeForge5\SpongeCommon\gradle\implementation.gradle’ as it does not exist.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 33.163 secs[/code]

well, you can if you set up a run configuration that just starts the server for you. it’s not very hard to do.

You get this error if the Git submodules are not properly initialized. We have separate Git repositories for SpongeForge, SpongeCommon and SpongeAPI. They need to be initialized with a special command before you can import the project into your IDE.

I haven’t used the GitHub client so I don’t know if it has any option in the GUI, however it should have an option to open a new Git Shell for the repository. Once you have done that you need to type git submodule --init --recursive to finish the initialization. After that, you should be able to setup your workspace normally.

1 Like