-
Notifications
You must be signed in to change notification settings - Fork 10
Project Structure
LeeGod edited this page Dec 22, 2021
·
6 revisions
This is a very quick introduction for people who are interested in the module structure
Platform is the core of fairy framework for each platforms, it may not exactly specify for a platform:
- core - The universal core that will be used everywhere, Containers, EventBus, Plugins are all inside. every other platforms will inherit this platform.
- mc - The universal platform for minecraft server related platform.
- bukkit - The platform for Bukkit related platform, working for any server software that uses bukkit as it base. inherit from mc platform.
- app - The platform for independent java application.
Module is the external module that will be used for plugins/apps that uses fairy framework, for example storage for Database storage such as MySQL, Mongo etc
- Modules will be externalized, you need to specify what module you want in fairy gradle plugin.
- Modules will not be shaded into your compiled jar. instead it will download it self on boot.
- Modules will be remapped, and a remapped jar will be cached in plugin's folder. Plugin compiled jar will pre-remap the module on compile.
Module | Description | Version |
---|---|---|
Content Cell | Content Cell | Content Cell |
Content Cell | Content Cell | Content Cell |
-
- Every platform gradle module should be named
<platformName>-platform
- Every platform gradle module should be named
-
- Every platform gradle module should be named
<platformName>-bootstrap
- The core bootstrap is an exception which it calls bootstrap in the naming. may be changed in future
- Every platform gradle module should be named
-
- Every universal module should be named
module.<moduleName>
- Every platform specified module should be placed inside parent folder
platform.<platformName>
- Gradle module should be named as
<platformName>-<moduleName>
. - For example:
bukkit-items
is a bukkit platform specific module, so it's insideplatform.bukkit
and namedbukkit-items
.
- Gradle module should be named as
- Every multi-platform module should have a parent folder named as
module.<moduleName>
- Each platform should be named as
<platformName>-<moduleName>
and place inside the parent folder. - For original universal module it should be named as
core-<moduleName>
. - For example
storage
is a universal module, but for bukkit platform it has some extensive functions, so it's namedmodule.storage
for parent folder, and universal module iscore-storage
, and bukkit module isbukkit-storage
. - Parent folder should not have it own build.gradle, instead it should have a parent.gradle and have the module version here.
- Each sub module shouldn't have it own versioning, it will inherit from parent.gradle by having
apply from: "$parent.projectDir/parent.gradle"
on top of the build.gradle.
- Each platform should be named as
- Every universal module should be named