Currently not stable and under heavy development!
A Forge implementation of the Sponge API.
- Homepage
- Source
- Issues
- Documentation
- Community Chat: #sponge on irc.esper.net
- Development Chat: #spongedev on irc.esper.net
- Java 8
The following steps will ensure your project is cloned properly.
git clone --recursive https://github.com/SpongePowered/SpongeForge.git
cd SpongeForge
cp scripts/pre-commit .git/hooks
Note: If you do not have Gradle installed then use ./gradlew
for Unix systems or Git Bash and gradlew.bat
for Windows systems in place of any gradle
command.
Before you are able to build SpongeForge, you must first prepare the environment:
- Run
gradle setupDecompWorkspace --refresh-dependencies
Note: You may substitute setupDecompWorkspace
for setupCIWorkspace
when building on a CI such as Jenkins.
For Eclipse
- Run
gradle eclipse
- Import Sponge as an existing project (File > Import > General)
- Select the root folder for SpongeForge and make sure
Search for nested projects
is enabled - Check Sponge when it finishes building and click Finish
For IntelliJ
- Make sure you have the Gradle plugin enabled (File > Settings > Plugins).
- Click File > New > Project from Existing Sources > Gradle and select the root folder for SpongeForge.
- Select Use customizable gradle wrapper if you do not have Gradle installed.
Note: The following is aimed to help you setup run configurations for Eclipse and IntelliJ, if you do not want to be able to run SpongeForge directly from your IDE then you can skip this.
For Eclipse
- Running
gradle eclipse
should have generated the run configurations automatically. - When launching the server for the first time, it will shutdown by itself. You will need to modify eula.txt to set eula=true (this means you agree to the Mojang EULA, if you do not wish to do this then you cannot run the server).
For IntelliJ
- Run
gradle genIntelliJRuns
- Restart IntelliJ IDEA or reload the project, the run configuration should now be generated.
- When launching the server for the first time, it will shutdown by itself. You will need to modify eula.txt to set eula=true (this means you agree to the Mojang EULA, if you do not wish to do this then you cannot run the server).
Note: If you do not have Gradle installed then use ./gradlew for Unix systems or Git Bash and gradlew.bat for Windows systems in place of any 'gradle' command.
Note: You must Setup the environment before you can build SpongeForge.
In order to build SpongeForge you simply need to run the gradle
command. You can find the compiled JAR files in ./build/libs
but in most cases
you'll only need 'spongeforge-x.x.x-x-x.x-x.jar'.
The following steps will update your clone with the official repo.
git pull
git submodule update --recursive
gradle setupDecompWorkspace --refresh-dependencies
A dependency was added, but my IDE is missing it! How do I add it?
If a new dependency was added, you can just restart your IDE and the Gradle plugin for that IDE should pull in the new dependencies.
Are you a talented programmer looking to contribute some code? We'd love the help!
- Open a pull request with your changes, following our guidelines.
- Please follow the above guidelines for your pull request(s) to be accepted.
Help! Things are not working!
Some issues can be resolved by deleting the '.gradle' folder in your user directory and running through the setup steps again, or even running
gradle cleanCache
and running through the setup again. Otherwise if you are having trouble with something that the README does not cover, feel free to join our IRC channel and ask for assistance.