Skip to content

Building From Source

SU4G3 edited this page Oct 9, 2026 · 2 revisions

Building From Source

Prerequisites

  • Java 17 (1.20.1 – 1.20.4), Java 21 (1.20.6 – 1.21.11, and required for all NeoForge builds regardless of which Java runs the root Fabric build), Java 25 (26.1+)
  • Gradle (included via wrapper)

Building the Fabric Mod

  1. Clone the repository

    git clone https://github.com/SU4G3/OpSec-Enhanced.git
    cd OpSec-Enhanced
  2. Build all versions

    # Windows
    .\gradlew.bat build
    
    # Linux/Mac
    ./gradlew build
  3. Build a specific version

    ./gradlew :1.20.1:build
    ./gradlew :1.20.2:build
    ./gradlew :1.20.4:build
    ./gradlew :1.20.6:build
    ./gradlew :1.21.1:build
    ./gradlew :1.21.4:build
    ./gradlew :1.21.6:build
    ./gradlew :1.21.9:build
    ./gradlew :1.21.11:build
    ./gradlew :26.1:build
    ./gradlew :26.2:build
    ./gradlew :26.3:build

Output JARs land in versions/<minecraft_version>/build/libs/:

Build Version Supports
1.20.1 1.20 – 1.20.1
1.20.2 1.20.2
1.20.4 1.20.3 – 1.20.4
1.20.6 1.20.5 – 1.20.6
1.21.1 1.21 – 1.21.1
1.21.4 1.21.2 – 1.21.5
1.21.6 1.21.6 – 1.21.8
1.21.9 1.21.9 – 1.21.10
1.21.11 1.21.11
26.1 26.1 – 26.1.2
26.2 26.2
26.3 26.3

This multi-version setup is powered by Stonecutter.

Building the NeoForge Mod

NeoForge builds are separate Gradle projects (neoforge/, neoforge-1.21.11/, neoforge-26.2/), not part of the Stonecutter multi-version setup above.

cd neoforge          # MC 1.21.1
./gradlew build

cd ../neoforge-1.21.11
./gradlew build

cd ../neoforge-26.2
./gradlew build

Each outputs opsec-[version].jar in its own build/libs/. NeoGradle requires Java 21 regardless of which Java runs the root Fabric build.

Clone this wiki locally