mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-24 01:58:25 +01:00
commit
1da29faed1
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,9 +2,12 @@ temporaryTestFolder/
|
||||
Plan.iml
|
||||
PlanPluginBridge.iml
|
||||
.sonar/
|
||||
builds/
|
||||
|
||||
*.db
|
||||
|
||||
**/.gradle
|
||||
|
||||
# Created by https://www.gitignore.io/api/maven,eclipse,intellij,netbeans,osx,windows,notepadpp,windows,java
|
||||
|
||||
### Maven ###
|
||||
|
107
Plan/build.gradle
Normal file
107
Plan/build.gradle
Normal file
@ -0,0 +1,107 @@
|
||||
plugins {
|
||||
id "java"
|
||||
id "net.ltgt.apt" version "0.19"
|
||||
id "com.github.johnrengelman.shadow" version "4.0.2"
|
||||
}
|
||||
|
||||
allprojects {
|
||||
wrapper.gradleVersion = "5.0"
|
||||
|
||||
group "com.djrapitops"
|
||||
version "4.6.0-SNAPSHOT"
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: "java"
|
||||
apply plugin: "maven"
|
||||
apply plugin: "net.ltgt.apt"
|
||||
apply plugin: "com.github.johnrengelman.shadow"
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
ext.daggerVersion = "2.19"
|
||||
ext.daggerCompilerVersion = "2.19"
|
||||
|
||||
ext.abstractPluginFrameworkVersion = "3.4.0"
|
||||
ext.planPluginBridgeVersion = "4.6.0"
|
||||
ext.bukkitVersion = "1.12.2-R0.1-SNAPSHOT"
|
||||
ext.spigotVersion = "1.12.2-R0.1-SNAPSHOT"
|
||||
ext.paperVersion = "1.12.2-R0.1-SNAPSHOT"
|
||||
ext.spongeVersion = "7.1.0"
|
||||
ext.bungeeVersion = "1.12-SNAPSHOT"
|
||||
ext.velocityVersion = "1.0-SNAPSHOT"
|
||||
ext.redisBungeeVersion = "0.3.8-SNAPSHOT"
|
||||
ext.httpClientVersion = "4.5.6"
|
||||
ext.commonsTextVersion = "1.6"
|
||||
ext.htmlCompressorVersion = "1.5.2"
|
||||
ext.caffeineVersion = "2.6.2"
|
||||
ext.h2Version = "1.4.196"
|
||||
ext.hikariVersion = "3.2.0"
|
||||
ext.slf4jVersion = "1.7.25"
|
||||
ext.geoIpVersion = "2.12.0"
|
||||
ext.guavaVersion = "26.0-jre"
|
||||
ext.bstatsVersion = "1.2"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { // Spigot Repository
|
||||
url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
|
||||
}
|
||||
maven { // Paper Repository
|
||||
url = "https://papermc.io/repo/repository/maven-public/"
|
||||
}
|
||||
maven { // Sponge Repository
|
||||
url = "https://repo.spongepowered.org/maven"
|
||||
}
|
||||
maven { // BungeeCord Repository
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots"
|
||||
}
|
||||
maven { // RedisBungee Repository
|
||||
url = "http://repo.md-5.net/content/repositories/snapshots/"
|
||||
}
|
||||
maven { // Velocity Repository
|
||||
url = "https://repo.velocitypowered.com/snapshots/"
|
||||
}
|
||||
maven { // bStats Repository
|
||||
url = "http://repo.bstats.org/content/repositories/releases/"
|
||||
}
|
||||
maven { // PlanPluginBridge Repository
|
||||
url = "https://dl.bintray.com/rsl1122/Plan-repository"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Dependency Injection used accross the project
|
||||
compile "com.google.dagger:dagger:$daggerVersion"
|
||||
annotationProcessor "com.google.dagger:dagger-compiler:$daggerCompilerVersion"
|
||||
testAnnotationProcessor "com.google.dagger:dagger-compiler:$daggerCompilerVersion"
|
||||
|
||||
// Test Tooling Dependencies
|
||||
testCompile "org.junit.jupiter:junit-jupiter-engine:5.3.2" // JUnit 5
|
||||
testCompile "org.junit.platform:junit-platform-runner:1.3.2" // JUnit 4 runner for JUnit 5 tests
|
||||
testCompile "org.junit.vintage:junit-vintage-engine:5.3.2" // JUnit 4 compatibility for JUnit 5
|
||||
testCompile "org.junit.jupiter:junit-jupiter-params:5.3.2" // JUnit 5, parameterized tests
|
||||
testCompile "org.junit-pioneer:junit-pioneer:0.3.0" // TempDirectory, TODO DEPENDENCY TO BE REMOVED ON JUNIT 5.4 RELEASE
|
||||
testCompile "org.mockito:mockito-core:2.23.4" // Mockito Core
|
||||
testCompile "org.mockito:mockito-junit-jupiter:2.23.4" // Mockito JUnit 5 Extension
|
||||
testCompile "org.seleniumhq.selenium:selenium-java:3.14.0" // Selenium (Browser tests)
|
||||
testCompile "com.jayway.awaitility:awaitility:1.7.0" // Awaitility (Concurrent wait conditions)
|
||||
|
||||
// Testing dependencies required by Plan
|
||||
testCompile "org.xerial:sqlite-jdbc:3.25.2" // SQLite
|
||||
}
|
||||
|
||||
|
||||
configurations {
|
||||
testArtifacts.extendsFrom testRuntime
|
||||
}
|
||||
// Test classes available to other modules
|
||||
task testJar(type: Jar) {
|
||||
classifier "test"
|
||||
from sourceSets.test.output
|
||||
}
|
||||
artifacts {
|
||||
testArtifacts testJar
|
||||
}
|
||||
}
|
23
Plan/bukkit/build.gradle
Normal file
23
Plan/bukkit/build.gradle
Normal file
@ -0,0 +1,23 @@
|
||||
dependencies {
|
||||
compile project(path: ":common", configuration: 'shadow')
|
||||
|
||||
compile "com.djrapitops:AbstractPluginFramework-bukkit:$abstractPluginFrameworkVersion"
|
||||
compile "org.bstats:bstats-bukkit:$bstatsVersion"
|
||||
|
||||
compileOnly "com.destroystokyo.paper:paper-api:$paperVersion"
|
||||
compileOnly "org.spigotmc:spigot-api:$spigotVersion"
|
||||
compileOnly "org.bukkit:bukkit:$bukkitVersion"
|
||||
|
||||
testCompile "com.destroystokyo.paper:paper-api:$paperVersion"
|
||||
testCompile "org.spigotmc:spigot-api:$spigotVersion"
|
||||
testCompile "org.bukkit:bukkit:$bukkitVersion"
|
||||
|
||||
testCompile project(path: ":common", configuration: 'testArtifacts')
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
configurations = [project.configurations.compile]
|
||||
|
||||
relocate 'org.bstats', 'com.djrapitops.plan.utilities.metrics'
|
||||
relocate 'org.slf4j', 'plan.org.slf4j'
|
||||
}
|
20
Plan/bungeecord/build.gradle
Normal file
20
Plan/bungeecord/build.gradle
Normal file
@ -0,0 +1,20 @@
|
||||
dependencies {
|
||||
compile project(path: ":common", configuration: 'shadow')
|
||||
|
||||
compile "com.djrapitops:AbstractPluginFramework-bungeecord:$abstractPluginFrameworkVersion"
|
||||
compile "org.bstats:bstats-bungeecord:$bstatsVersion"
|
||||
|
||||
compileOnly "net.md-5:bungeecord-api:$bungeeVersion"
|
||||
compileOnly "com.imaginarycode.minecraft:RedisBungee:$redisBungeeVersion"
|
||||
testCompile "net.md-5:bungeecord-api:$bungeeVersion"
|
||||
testCompile "com.imaginarycode.minecraft:RedisBungee:$redisBungeeVersion"
|
||||
|
||||
testCompile project(path: ":common", configuration: 'testArtifacts')
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
configurations = [project.configurations.compile]
|
||||
|
||||
relocate 'org.bstats', 'com.djrapitops.plan.utilities.metrics'
|
||||
relocate 'org.slf4j', 'plan.org.slf4j'
|
||||
}
|
44
Plan/common/build.gradle
Normal file
44
Plan/common/build.gradle
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* Module that includes common functionality between all platforms.
|
||||
* - Contains functionality related dependencies.
|
||||
* - Contains abstractions and interfaces
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
compile "com.djrapitops:AbstractPluginFramework-api:$abstractPluginFrameworkVersion"
|
||||
compile "com.djrapitops:PlanPluginBridge:$planPluginBridgeVersion"
|
||||
compile "org.apache.httpcomponents:httpclient:$httpClientVersion"
|
||||
compile "org.apache.commons:commons-text:$commonsTextVersion"
|
||||
compile "com.googlecode.htmlcompressor:htmlcompressor:$htmlCompressorVersion"
|
||||
compile "com.github.ben-manes.caffeine:caffeine:$caffeineVersion"
|
||||
compile "com.h2database:h2:$h2Version"
|
||||
compile "com.zaxxer:HikariCP:$hikariVersion"
|
||||
runtime "org.slf4j:slf4j-nop:$slf4jVersion"
|
||||
compile "org.slf4j:slf4j-api:$slf4jVersion"
|
||||
compile "com.maxmind.geoip2:geoip2:$geoIpVersion"
|
||||
compileOnly "com.google.guava:guava:$guavaVersion"
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
configurations = [project.configurations.compile]
|
||||
|
||||
// Exclude these files
|
||||
exclude "org/json/**/*"
|
||||
exclude "**/*.svg"
|
||||
exclude "**/*.ttf"
|
||||
exclude "**/*.woff"
|
||||
exclude "**/*.eot"
|
||||
exclude "**/*.woff2"
|
||||
exclude "**/*.psd"
|
||||
|
||||
relocate('org.apache', 'plan.org.apache') {
|
||||
exclude 'org/apache/logging/**'
|
||||
}
|
||||
relocate 'com.maxmind', 'plan.com.maxmind'
|
||||
relocate 'com.fasterxml', 'plan.com.fasterxml'
|
||||
relocate 'com.zaxxer', 'plan.com.zaxxer'
|
||||
relocate 'org.h2', 'plan.org.h2'
|
||||
relocate 'org.bstats', 'plan.org.bstats'
|
||||
relocate 'org.slf4j', 'plan.org.slf4j'
|
||||
relocate 'com.google.dagger', 'plan.com.google.dagger'
|
||||
}
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package utilities.dagger;
|
||||
|
||||
import com.djrapitops.plan.PlanPlugin;
|
||||
import com.djrapitops.plan.api.exceptions.EnableException;
|
||||
import com.djrapitops.plan.system.database.DBSystem;
|
||||
import com.djrapitops.plan.system.database.databases.sql.H2DB;
|
||||
@ -87,6 +88,10 @@ public class PluginSuperClassBindingModule {
|
||||
@Override
|
||||
protected void unregisterListeners() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void callEnableEvent(PlanPlugin plugin) {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
19
Plan/plugin/build.gradle
Normal file
19
Plan/plugin/build.gradle
Normal file
@ -0,0 +1,19 @@
|
||||
dependencies {
|
||||
compile project(path: ":common", configuration: 'shadow')
|
||||
compile project(path: ":bukkit", configuration: 'shadow')
|
||||
compile project(path: ":sponge", configuration: 'shadow')
|
||||
compile project(path: ":bungeecord", configuration: 'shadow')
|
||||
compile project(path: ":velocity", configuration: 'shadow')
|
||||
testCompile project(path: ":common", configuration: 'testArtifacts')
|
||||
testCompile project(path: ":bukkit", configuration: 'testArtifacts')
|
||||
testCompile project(path: ":sponge", configuration: 'testArtifacts')
|
||||
testCompile project(path: ":bungeecord", configuration: 'testArtifacts')
|
||||
testCompile project(path: ":velocity", configuration: 'testArtifacts')
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
configurations = [project.configurations.compile]
|
||||
|
||||
destinationDir = file("$rootDir/builds/")
|
||||
classifier = null
|
||||
}
|
8
Plan/settings.gradle
Normal file
8
Plan/settings.gradle
Normal file
@ -0,0 +1,8 @@
|
||||
rootProject.name = 'Plan'
|
||||
|
||||
include 'common'
|
||||
include 'bukkit'
|
||||
include 'sponge'
|
||||
include 'bungeecord'
|
||||
include 'velocity'
|
||||
include 'plugin'
|
19
Plan/sponge/build.gradle
Normal file
19
Plan/sponge/build.gradle
Normal file
@ -0,0 +1,19 @@
|
||||
dependencies {
|
||||
compile project(path: ":common", configuration: 'shadow')
|
||||
|
||||
compile "com.djrapitops:AbstractPluginFramework-sponge:$abstractPluginFrameworkVersion"
|
||||
compile "org.bstats:bstats-sponge:$bstatsVersion"
|
||||
|
||||
compileOnly "org.spongepowered:spongeapi:$spongeVersion"
|
||||
testCompile "org.spongepowered:spongeapi:$spongeVersion"
|
||||
|
||||
annotationProcessor "org.spongepowered:spongeapi:$spongeVersion"
|
||||
|
||||
testCompile project(path: ":common", configuration: 'testArtifacts')
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
configurations = [project.configurations.compile]
|
||||
|
||||
relocate "org.bstats", "com.djrapitops.plan.utilities.metrics"
|
||||
}
|
15
Plan/velocity/build.gradle
Normal file
15
Plan/velocity/build.gradle
Normal file
@ -0,0 +1,15 @@
|
||||
dependencies {
|
||||
compile project(path: ":common", configuration: 'shadow')
|
||||
compile "com.djrapitops:AbstractPluginFramework-velocity:$abstractPluginFrameworkVersion"
|
||||
|
||||
compileOnly "com.velocitypowered:velocity-api:$velocityVersion"
|
||||
testCompile "com.velocitypowered:velocity-api:$velocityVersion"
|
||||
|
||||
annotationProcessor "com.velocitypowered:velocity-api:$velocityVersion"
|
||||
|
||||
testCompile project(path: ":common", configuration: 'testArtifacts')
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
configurations = [project.configurations.compile]
|
||||
}
|
@ -1,7 +1,9 @@
|
||||
cd Plan
|
||||
|
||||
gradle tasks
|
||||
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||
mvn -T 1C test
|
||||
gradle test
|
||||
fi
|
||||
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user