Skip to content

Installation

Petrus Pradella edited this page Jul 15, 2026 · 13 revisions

Installation

The smallest thing that works

Add the repository and the recommended flavor (everydatabase-core) — every backend works out of the box.

Gradle

repositories {
    maven { url 'https://maven.petrus.dev/public' }
    mavenCentral()
}

dependencies {
    implementation 'br.com.finalcraft.everydatabase:everydatabase-core:1.0.9' // Only this one is necessary
   // implementation 'br.com.finalcraft.everydatabase:everydatabase-manager:1.0.9' // Separated module to handle cache and references
}

Maven

<repositories>
  <repository>
    <id>petrus-public</id>
    <url>https://maven.petrus.dev/public</url>
  </repository>
</repositories>

<dependency>
  <groupId>br.com.finalcraft.everydatabase</groupId>
  <artifactId>everydatabase-core</artifactId>
  <version>1.0.9</version>
</dependency>

Now jump to Quick Start for an end-to-end save/find, or Defining Entities to learn the descriptor.


Flavors

Flavor Artifact How deps reach you Pick it when…
Core (recommended) everydatabase-core normal POM dependencies you control your build and want to override/exclude versions the normal way
Libby everydatabase-libby downloaded at runtime via Libby you want a tiny jar and are fine fetching the set at first launch

everydatabase-core — recommended

Every backend dependency is declared as a normal POM dependency. It works unmodified, and you keep full control through standard dependency management — upgrade, downgrade, or exclude any library by declaring your own. See the override recipes on Dependency Versions & Overrides.

implementation 'br.com.finalcraft.everydatabase:everydatabase-core:1.0.9'

everydatabase-libby — runtime download

A thin coordinator (package br.com.finalcraft.everydatabase.libby) that downloads the canonical, non-relocated libraries at runtime. Bootstrap it before touching any storage class (e.g. in a plugin's onLoad):

import br.com.finalcraft.everydatabase.libby.DependencyManager;
import br.com.finalcraft.everydatabase.libby.EveryDatabaseDependencies;

DependencyManager manager = new DependencyManager("MyPlugin", getDataFolder(), "libs");
EveryDatabaseDependencies.loadAll(manager);   // then use Storages normally

📌 Noteeverydatabase-libby itself depends on net.byteflux:libby-core, resolved from https://repo.alessiodp.com/releases/. Add that repository to your build alongside the one above.


Adding the manager add-on (optional)

Typed references between entities and per-type caching live in a separate, optional artifact. Add both explicitly (the manager sits on top of a core flavor):

implementation 'br.com.finalcraft.everydatabase:everydatabase-manager:1.0.9'
implementation 'br.com.finalcraft.everydatabase:everydatabase-core:1.0.9'

Maven:

<dependency>
  <groupId>br.com.finalcraft.everydatabase</groupId>
  <artifactId>everydatabase-manager</artifactId>
  <version>1.0.9</version>
</dependency>
<dependency>
  <groupId>br.com.finalcraft.everydatabase</groupId>
  <artifactId>everydatabase-core</artifactId>
  <version>1.0.9</version>
</dependency>

It's an extra feature layer — see Caching & References.

The Jedis cache-sync add-on (optional)

A further opt-in module, everydatabase-manager-jedis, adds a Redis/Valkey pub-sub transport for cross-instance cache invalidation — useful when your backend has no native push feed (MySQL/MariaDB, H2, the file backends) but you still want push-based cache sync. It pulls in the Jedis client (kept out of every other module's graph) and layers on the manager, so add it alongside everydatabase-manager and a core flavor:

implementation 'br.com.finalcraft.everydatabase:everydatabase-manager-jedis:1.0.9'
implementation 'br.com.finalcraft.everydatabase:everydatabase-manager:1.0.9'
implementation 'br.com.finalcraft.everydatabase:everydatabase-core:1.0.9'

See Cross-Process Cache Sync for how it plugs into CacheSync.


Java requirements

Everything runs on Java 8+. The published artifacts are Java 8 bytecode, and the default dependency versions are pinned to the last Java-8-compatible lines. On Java 11+ you can override to newer majors (HikariCP 5.x, H2 2.x) with the core flavor — version numbers and recipes live on Dependency Versions & Overrides.


See also

Clone this wiki locally