Skip to content

Building from Source

Petrus Pradella edited this page Jul 23, 2026 · 1 revision

Building from Source

This page is for people compiling EverNifeCore itself. If you only want to use the framework in your own plugin, you don't need to build it - see Installation for the Maven coordinates.


Prerequisites

  • JDK 25. Run Gradle with a Java 25 JDK. Gradle (9.5.x, via the wrapper) provisions the per-module compiler toolchains automatically, and a single Java 25 toolchain compiles and runs everything, tests included. There is no compiler pin anywhere - see Java Versions and Toolchains for why.
  • The Gradle wrapper (./gradlew) - no separate Gradle install needed.
  • For the minecraft module only: a set of local/private JARs (paid or unobtainable plugins). See Private dependencies below.

Point JAVA_HOME at your JDK 25 and use the wrapper:

# example (adjust the path to your JDK 25)
export JAVA_HOME=/path/to/jdk-25
./gradlew build

Build commands

# Build every subproject
./gradlew build

# Build the deployable Bukkit plugin JAR (this is the real artifact)
./gradlew :minecraft:shadowJar

# Build the Hytale plugin JAR
./gradlew :hytale:shadowJar

# Run all tests
./gradlew test

# Run a single test class
./gradlew :minecraft:test --tests "br.com.finalcraft.evernifecore.config.ConfigTest"

The deployable artifact is the shadow jar

For the Bukkit side, :minecraft:build produces nothing you can deploy. The default jar task is disabled on purpose; the real, runnable plugin is the shadow jar:

./gradlew :minecraft:shadowJar

The shadow jar bundles a curated allowlist of dependencies and relocates them under br.com.finalcraft.libs.* (libby, kyori/adventure, NBT-API, triumph-gui) and br.com.finalcraft.everydatabase.libs.* (the EveryDatabase runtime stack). Everything else is expected from the server or downloaded by libby at runtime. The Hytale equivalent is :hytale:shadowJar (classifier Hytale); because Hytale has no libby, its shadow jar embeds the full EveryDatabase stack - see Hytale Platform.


Tests

  • ./gradlew test runs the minecraft suite (config, placeholders, argumento, util - one NBT self-test is skipped when headless) and the common suite (the PlayerData / storage redesign).
  • The common tests compile and run on the Java 25 test toolchain even though common's main is capped to Java 8 bytecode.
  • No Docker and no external services are needed for the unit suite. The storage tests use the EveryDatabase InMemory / H2 / LocalFile backends.
  • The repo-root docker-compose.yml (MariaDB/MySQL, PostgreSQL, MongoDB, Valkey, Redis) is only for manual testing of the network storage backends - not part of ./gradlew test.

When re-running a specific test, add --rerun-tasks. --tests "..." alone can report the task as UP-TO-DATE and reuse a stale prior result.


Private dependencies

Several compileOnly dependencies are paid or otherwise unobtainable plugins resolved from local flatDir paths (declared in the root build.gradle): FeatherBoard, BossShopPro, AuthMe, GriefPreventionPlus, griefdefender-bukkit, PlaceholderAPI, MVdWPlaceholderAPI, ProtocolLib, and the older WorldGuard/WorldEdit dist jars.

Which modules need them:

Module Needs the private flatDir jars?
common No - compiles cleanly on its own
api-contracts No
libby No
minecraft (+ its modules/*) Yes - won't compile without them

So you can build and test common, api-contracts, and libby without any private jars; only the minecraft module requires them.

CraftBukkit is not needed

No CraftBukkit JAR is required to build. Nothing compiles against net.minecraft.* or org.bukkit.craftbukkit.* - the only CraftBukkit references left in the sources are reflection strings that resolve against the real server at runtime. The Bukkit API floor is spigot-api (plus bukkit for the older version-compat modules), from the version catalog. See Version Compatibility.


Versions and publishing

  • All versions live in gradle/libs.versions.toml (the version catalog), including the project version itself ([versions].evernifecore, currently 3.0.1). Add or bump a version there, never inline in a module. The only inline coordinates left are the flatDir jars, which have no group/version to catalog.
  • Publishing (./gradlew publish) targets https://maven.petrus.dev/public and requires the env vars PETRUSMAVEN_ACTOR and PETRUSMAVEN_TOKEN. The published artifacts are evernifecore-minecraft, evernifecore-common, evernifecore-common-relocated, and evernifecore-hytale.

See also

Clone this wiki locally