Skip to content

Latest commit

 

History

History
115 lines (75 loc) · 4.11 KB

STRUCTURE.md

File metadata and controls

115 lines (75 loc) · 4.11 KB

 

SEE README.md FOR DEPENDENCY INFORMATION
SEE WIKI FOR FEATURE DOCUMENTATION

Module Structure

All 6 modules are published as repository artifacts for use, but only 5 are intended for shading into your project.

  • The 5 modules that can be shaded are:
    • shared-utils, shared-jar, standalone-utils, standalone-jar, spigot-utils
  • The last module, spigot-jar, compiles the spigot-jar which should not be shaded.

NMS & Cross Version Compatibility

  • NMS (net.minecraft.server) support has been extracted into a sister project (KamiCommonNMS)
    • This module is included in spigot-utils & spigot-jar

Module Hierarchy

ScreenShot

Spigot Development

For developers writing spigot plugins.

  • The primary module responsible for compiling the spigot plugin jar.
  • This module uses relocation for all dependencies (including transitives) to avoid conflicts on the server.

This module inherits: spigot-utils, shared-jar

It also adds the following dependencies:

  • org.apache.httpcomponents.client5:httpclient5
  • org.apache.httpcomponents.core5:httpcore5

(⭐) Should NOT be shaded ❌

  • should be added to the server as a plugin, and to projects as an API only
  • A developer jar file containing some of the spigot APIs from KamiCommon

This module inherits: shared-utils, standalone-utils, and KamiCommonNMS

It also adds the following dependencies:

  • com.google.code.gson:gson
  • org.apache.commons:commons-text

(⭐) SHOULD be shaded ✅

Standalone Development

For developers compiling outside the spigot server environment.

  • A standalone jar file containing utilities that do not utilize the spigot-api

This module inherits: shared-jar, standalone-utils

It also adds the following dependencies:

  • com.google.code.gson:gson

(⭐) SHOULD be shaded ✅

  • A jar file containing standalone utilities that do not require shaded dependencies

This module inherits: shared-utils

It also adds the following dependencies:

  • org.yaml:snakeyaml
  • org.json:json

(⭐) SHOULD be shaded ✅

  • jar does not function as a spigot plugin
  • meant to be integrated (shaded) into your project
  • While code is also present in the spigot-jar, relocations are not applied (do not assume it will work with KamiCommon the plugin)

Shared Development

For developers who want some generic KamiCommon libraries in their project.

  • A jar file containing generic utility classes (with their shaded dependencies)
  • Included (transitive dependency) in both spigot-jar and standalone-jar

This module inherits: shared-utils

It also adds the following dependencies:

  • com.zaxxer:HikariCP
  • com.mysql:mysql-connector-j
  • com.rabbitmq:amqp-client
  • org.slf4j:slf4j-api
  • org.slf4j:slf4j-simple
  • io.lettuce:lettuce-core
  • com.fasterxml.jackson.core:jackson-databind
  • com.fasterxml.jackson.core:jackson-annotations

(⭐) SHOULD be shaded ✅

  • A jar file containing shared generic utility classes (classes with no dependencies)

This module inherits: none

It also adds the following dependencies:

  • none

(⭐) SHOULD be shaded ✅

Warning

  • Only the spigot-jar module relocates dependencies. This means that developing against spigot-utils will develop against non-relocated dependencies.
  • It is highly unlikely that a jar developed with spigot-utils without shading will work on a server, regardless if the KamiCommon plugin is installed.
  • If you intended to use a module other than spigot-jar, you need to shade it and its dependencies into your project.