mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-31 21:48:32 +01:00
Fixed Gradle build failing, shadow problems remain.
Shadow does not relocate classes in the final jar for some reason, and the final jar is bigger than what is produced by maven
This commit is contained in:
parent
486819cd2e
commit
8e2df1de9b
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@ temporaryTestFolder/
|
||||
Plan.iml
|
||||
PlanPluginBridge.iml
|
||||
.sonar/
|
||||
builds/
|
||||
|
||||
*.db
|
||||
|
||||
|
@ -1,27 +1,30 @@
|
||||
plugins {
|
||||
id "java"
|
||||
id "com.github.johnrengelman.shadow" version "2.0.4"
|
||||
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.5.0-SNAPSHOT"
|
||||
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.9"
|
||||
ext.daggerVersion = "2.19"
|
||||
ext.daggerCompilerVersion = "2.19"
|
||||
|
||||
ext.abstractPluginFrameworkVersion = "3.4.0"
|
||||
ext.planPluginBridgeVersion = "4.5.1"
|
||||
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"
|
||||
@ -42,43 +45,62 @@ subprojects {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
maven { // Spigot Repository
|
||||
url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
|
||||
}
|
||||
maven {
|
||||
maven { // Paper Repository
|
||||
url = "https://papermc.io/repo/repository/maven-public/"
|
||||
}
|
||||
maven {
|
||||
maven { // Sponge Repository
|
||||
url = "https://repo.spongepowered.org/maven"
|
||||
}
|
||||
maven {
|
||||
maven { // BungeeCord Repository
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots"
|
||||
}
|
||||
maven {
|
||||
maven { // RedisBungee Repository
|
||||
url = "http://repo.md-5.net/content/repositories/snapshots/"
|
||||
}
|
||||
maven {
|
||||
maven { // Velocity Repository
|
||||
url = "https://repo.velocitypowered.com/snapshots/"
|
||||
}
|
||||
maven {
|
||||
maven { // bStats Repository
|
||||
url = "http://repo.bstats.org/content/repositories/releases/"
|
||||
}
|
||||
maven {
|
||||
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"
|
||||
|
||||
annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
|
||||
// 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
|
||||
}
|
||||
|
||||
// Dependencies for tests
|
||||
testCompile "org.mockito:mockito-core:2.23.4"
|
||||
testCompile "org.xerial:sqlite-jdbc:3.25.2"
|
||||
testCompile "junit:junit:4.12"
|
||||
testCompile "org.hamcrest:hamcrest-core:1.3"
|
||||
testCompile "org.seleniumhq.selenium:selenium-java:3.14.0"
|
||||
testCompile "com.jayway.awaitility:awaitility:1.7.0"
|
||||
// Test classes available to other modules
|
||||
configurations {
|
||||
testArtifacts.extendsFrom testRuntime
|
||||
}
|
||||
task testJar(type: Jar) {
|
||||
classifier "test"
|
||||
from sourceSets.test.output
|
||||
}
|
||||
artifacts {
|
||||
testArtifacts testJar
|
||||
}
|
||||
}
|
@ -3,15 +3,15 @@ dependencies {
|
||||
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"
|
||||
compileOnly "org.spigotmc:spigot-api:$spigotVersion"
|
||||
compileOnly "com.destroystokyo.paper:paper-api:$paperVersion"
|
||||
|
||||
testCompile "org.bukkit:bukkit:$bukkitVersion"
|
||||
testCompile "com.destroystokyo.paper:paper-api:$paperVersion"
|
||||
testCompile "org.spigotmc:spigot-api:$spigotVersion"
|
||||
testCompile "com.destroystokyo.paper:paper-api:$paperVersion"
|
||||
testCompile "org.bukkit:bukkit:$bukkitVersion"
|
||||
|
||||
testCompile project(":common")
|
||||
testCompile project(path: ":common", configuration: 'testArtifacts')
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
|
@ -2,11 +2,14 @@ dependencies {
|
||||
compile project(":common")
|
||||
|
||||
compile "com.djrapitops:AbstractPluginFramework-bungeecord:$abstractPluginFrameworkVersion"
|
||||
compile "net.md-5:bungeecord-api:$bungeeVersion"
|
||||
compile "com.imaginarycode.minecraft:RedisBungee:$redisBungeeVersion"
|
||||
compile "org.bstats:bstats-bungeecord:$bstatsVersion"
|
||||
|
||||
testCompile project(":common")
|
||||
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 {
|
||||
|
@ -20,7 +20,7 @@ dependencies {
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
relocate 'org.apache', 'plan.org.apache', {
|
||||
relocate ('org.apache', 'plan.org.apache') {
|
||||
exclude 'org/apache/logging/**'
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -5,11 +5,11 @@ dependencies {
|
||||
compile project(":bungeecord")
|
||||
compile project(":velocity")
|
||||
|
||||
testCompile project(":common")
|
||||
testCompile project(":bukkit")
|
||||
testCompile project(":sponge")
|
||||
testCompile project(":bungeecord")
|
||||
testCompile project(":velocity")
|
||||
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 {
|
||||
|
@ -4,11 +4,11 @@ dependencies {
|
||||
compile "org.bstats:bstats-sponge:$bstatsVersion"
|
||||
|
||||
compileOnly "org.spongepowered:spongeapi:$spongeVersion"
|
||||
testCompile "org.spongepowered:spongeapi:$spongeVersion"
|
||||
|
||||
annotationProcessor "org.spongepowered:spongeapi:$spongeVersion"
|
||||
annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
|
||||
|
||||
testCompile project(":common")
|
||||
testCompile project(path: ":common", configuration: 'testArtifacts')
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
|
@ -1,9 +1,11 @@
|
||||
dependencies {
|
||||
compile project(":common")
|
||||
compile "com.djrapitops:AbstractPluginFramework-velocity:$abstractPluginFrameworkVersion"
|
||||
compile "com.velocitypowered:velocity-api:$velocityVersion"
|
||||
|
||||
compileOnly "com.velocitypowered:velocity-api:$velocityVersion"
|
||||
testCompile "com.velocitypowered:velocity-api:$velocityVersion"
|
||||
|
||||
annotationProcessor "com.velocitypowered:velocity-api:$velocityVersion"
|
||||
|
||||
testCompile project(":common")
|
||||
testCompile project(path: ":common", configuration: 'testArtifacts')
|
||||
}
|
Loading…
Reference in New Issue
Block a user