Skip to content

Tutorial: Building from source

Martijn Muijsers edited this page Aug 23, 2023 · 13 revisions

If you only want to build the server .jar file yourself, without a plan to add or change any patches, you can follow these steps.


    ℹ️    This tutorial is written for Gale,    
             but you can follow the same steps on any other fork!    
 

Requirements beforehand

    ✔  You need to know how to open a command terminal and run commands

    ✔  You will need 6+ GB of free RAM

    ✔  You must have installed Java JDK 17 or higher

    ✔  You must have installed Git (or a Git client like GitHub Desktop, Sourcetree or IntelliJ IDEA).
           You don't need to know how to use Git.

1. Clone Gale to your machine

First, you must clone the repository onto your own machine. There are two ways to do this:

  • with the git init command, or
  • with a Git client (for example GitHub Desktop, Sourcetree or IntelliJ IDEA)

With git init

  • Open a command terminal
  • Go to the directory in which you would like to place the Gale directory.
    (A new directory called 'Gale' will be created: for example, if you go to ~/minecraft_stuff, the Gale files will be placed in ~/minecraft_stuff/Gale)
  • Run the following command: git init https://github.com/GaleMC/Gale.git

With GitHub Desktop

  • File > Clone repository... > URL
  • Paste the following URL: https://github.com/GaleMC/Gale.git
  • Optional: choose a folder to place Gale in
    (you can skip this to use the default location)
  • Clone

With Sourcetree

  • File > Clone / New...
  • In the Source Path / URL field, paste the following URL: https://github.com/GaleMC/Gale.git
  • Optional: choose the folder to place Gale in
    (you can skip this to use the default location)
  • Clone

With IntelliJ IDEA

  • File > New > Project from Version Control...
  • In the URL field, paste the following URL: https://github.com/GaleMC/Gale.git
  • Optional: choose the folder to place Gale in
    (you can skip this to use the default location)
  • Clone

2. Create the Paperclip jar file

  • In a command terminal, navigate to the Gale folder you just created
    (if you type ls and you see a file called .editorconfig and a file called gradlew, you are in the right folder)

  • Run the following command: ./gradlew applyPatches


        ⚠️   This step needs a lot of memory!    

    For some systems, you need at least 6+ GB of free RAM, but on other systems,
    you need at least 10+ GB of free RAM!
    If you do not have enough memory, you will get a very vague error saying the task failed, without an explanation.
  • Run the following command: ./gradlew createReobfPaperclipJar

  • You will find the .jar file in: .../Gale/build/libs/
    For 1.19.3, it is called gale-paperclip-1.19.3-R0.1-SNAPSHOT-reobf.jar

  • You can place the .jar file in the place of the normal vanilla or Paper jar, and run it!

© Gale 2023