At this point, we’ve added a bit of content into the game, and you may be wanting to export your mod so that you can use it outside of Eclipse. This process is a little bit more complicated than exporting as a JAR file through Eclipse’s tools.

First, we need to edit a few of the files in your mod directory. Let’s start with .gitignore. This file isn’t necessary for releasing your mod, but it is needed if you are posting the source on GitHub (which you need to do). This file tells GitHub to ignore certain files or directories that aren’t relevant to the source code (e.g. all our save files). Edit it to look like this:

# eclipse

# idea

# gradle

# other

Each line specifies a directory or file to ignore. The lines with # characters in front are comments.

Next, we need to edit the build.gradle file. This file is responsible for giving various instructions on actually building the JAR file. We need to edit three values: version, group, and archivesBaseName. (Hopefully, these are pretty self-explanatory.) This process can be automated in 1.12.2, and will be fully automated in 1.13.

version = "1.12.2-1.0"
group = "com.cubicoder.tutorialmod"
archivesBaseName = "TutorialMod"

Finally open a command prompt in the root directory of the project (TutorialMod for me) and run the command gradlew build (./gradlew build if you’re not on Windows). Your mod JAR will be in the directory /build/libs/. export1 Happy playing! You can now publish your mod on CurseForge if you think the world is ready for it.