-
-
Notifications
You must be signed in to change notification settings - Fork 170
Project Setup
Page version: 5.1 build 791
-
Fork the Plan repository & Clone that repository to your workstation.
Here is a Tutorial. -
Open
/Plan/
project folder inside the repository you just downloaded in your favorite IDE.
Most IDEs will sync the workspace and you can start working on the project.
If you're having issues join Discord or open an issue and I'll help you out.
The project is split into 8 modules.
Module | Description |
---|---|
api |
Easily available API that is distributed via a maven repository |
extension |
Module for registering built in extensions that use DataExtension API |
common |
System related abstractions and main logic is in this package. Most work is done here. |
bukkit |
Bukkit/Spigot/Paper related classes |
bungee |
BungeeCord related classes |
sponge |
Sponge related classes |
velocity |
Velocity related classes |
plugin |
Module for shading all other modules into a single jar |
Plan uses Dagger for dependency injection.
Your IDE may be complaining about DaggerPlanBukkitComponent
or another Dagger###Component
class not being available.
Make sure that /<module>/build/generated/
is included as a Generated Sources root.
To build a new plugin artifact to use on servers, use
gradle build
The artifact will be placed in /repo_root/Plan/builds/
To run tests, use
gradle test
To run CheckStyle checks run
gradle checkstyleMain checkstyleTest
Maven Local Dependencies
mavenLocal()
is not included in the repositories of main build.gradle.
If you need locally installed dependencies, add it to the main build.gradle for test builds.
If you would like to know a bit more how the project is put together before diving in, you can check out Project Architecture
The following sections are documentation for different one-time set-up steps for the project, written down in case I need to do it again years after I forgot about it.
Some tests need additional resources to be run, such as MySQL test or Selenium tests. It is not expected for devs to set these up on their own machines, but they should run on the CI.
The resource information is set using environmental variables. Those can be found from https://github.com/plan-player-analytics/Plan/blob/master/Plan/common/src/test/java/utilities/CIProperties.java
In order to publish artifacts to Bintray, following environmental variables need to be set
-
BINTRAY_KEY
: get from https://bintray.com/profile/edit > API Keys -
BINTRAY_USER
: Bintray username
build gradle config for bintray (At the time of writing this is in the API module)
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
pkg {
repo = 'Plan-repository'
name = 'Plan-API'
licenses = ['LGPL-v3.0']
vcsUrl = 'https://github.com/plan-player-analytics/Plan'
issueTrackerUrl = 'https://github.com/plan-player-analytics/Plan/issues'
version {
name = "$apiVersion"
desc = "Plan API version $apiVersion"
}
publications = ['BintrayPublication']
}
}
publishing {
publications {
BintrayPublication(MavenPublication) {
groupId = 'com.djrapitops'
artifactId = 'Plan-api'
version = "$apiVersion"
artifact jar
}
mavenJava(MavenPublication) {
groupId = 'com.djrapitops'
artifactId = 'Plan-api'
version = "$apiVersion"
artifact jar
}
}
}