move bukkit-legacy module to a separate project, cleanup poms

This commit is contained in:
Luck 2018-01-08 20:01:02 +00:00
parent f646c04d09
commit ea94bd8696
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
12 changed files with 139 additions and 266 deletions

View File

@ -84,6 +84,7 @@
<version>19.0</version>
<scope>provided</scope>
</dependency>
<!-- jsr305 -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>

View File

@ -242,7 +242,16 @@ public class Contexts {
}
private int calculateHashCode() {
return Objects.hash(this.context, this.op, this.includeGlobal, this.includeGlobalWorld, this.applyGroups, this.applyGlobalGroups, this.applyGlobalWorldGroups);
final int PRIME = 59;
int result = 1;
result = result * PRIME + this.context.hashCode();
result = result * PRIME + (this.op ? 79 : 97);
result = result * PRIME + (this.includeGlobal ? 79 : 97);
result = result * PRIME + (this.includeGlobalWorld ? 79 : 97);
result = result * PRIME + (this.applyGroups ? 79 : 97);
result = result * PRIME + (this.applyGlobalGroups ? 79 : 97);
result = result * PRIME + (this.applyGlobalWorldGroups ? 79 : 97);
return result;
}
@Override

View File

@ -1,121 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>luckperms</artifactId>
<groupId>me.lucko.luckperms</groupId>
<version>4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>luckperms-bukkit-legacy</artifactId>
<build>
<defaultGoal>clean package</defaultGoal>
<finalName>LuckPerms-Bukkit-Legacy-${full.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler.version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${shade.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>false</minimizeJar>
<createDependencyReducedPom>false</createDependencyReducedPom>
<relocations>
<relocation>
<pattern>com.google.common</pattern>
<shadedPattern>me.lucko.luckperms.lib.guava</shadedPattern>
</relocation>
<relocation>
<pattern>com.google.gson</pattern>
<shadedPattern>me.lucko.luckperms.lib.gson</shadedPattern>
</relocation>
<relocation>
<pattern>net.kyori.text</pattern>
<shadedPattern>me.lucko.luckperms.lib.text</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>sign</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<!-- LuckPerms Bukkit -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-bukkit</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-common</artifactId>
</exclusion>
<exclusion>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Shade gson and guava, as they are not included in earlier Bukkit releases -->
<!-- gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.7</version>
<scope>compile</scope>
</dependency>
<!-- guava -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@ -58,13 +58,31 @@
</build>
<dependencies>
<!-- Spigot API -->
<!-- common -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-common</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<!-- jsr305 -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<scope>provided</scope>
</dependency>
<!-- Spigot -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.12.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- Vault -->
<dependency>
<groupId>net.milkbowl.vault</groupId>
@ -78,26 +96,6 @@
</exclusion>
</exclusions>
</dependency>
<!-- LuckPerms Common -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-common</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<!-- LuckPerms API -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-api</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<scope>provided</scope>
</dependency>
<!-- LilyPad -->
<dependency>
<groupId>lilypad.client.connect</groupId>
@ -105,7 +103,6 @@
<version>0.0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- ************** Migration Plugins ************** -->
<!-- zPermissions -->
<dependency>
<groupId>org.tyrannyofheaven.bukkit</groupId>

View File

@ -140,9 +140,12 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
private LogDispatcher logDispatcher;
private Set<UUID> uniqueConnections = ConcurrentHashMap.newKeySet();
private boolean invalidVersion = false;
@Override
public void onLoad() {
if (checkInvalidVersion()) {
this.invalidVersion = true;
return;
}
@ -158,7 +161,7 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
@Override
public void onEnable() {
if (checkInvalidVersion()) {
if (this.invalidVersion) {
getLogger().severe("----------------------------------------------------------------------");
getLogger().severe("Your server version is not compatible with this build of LuckPerms. :(");
getLogger().severe("");
@ -332,7 +335,7 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
@Override
public void onDisable() {
if (checkInvalidVersion()) {
if (this.invalidVersion) {
return;
}

View File

@ -58,6 +58,22 @@
</build>
<dependencies>
<!-- common -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-common</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<!-- jsr305 -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<scope>provided</scope>
</dependency>
<!-- BungeeCord -->
<dependency>
<groupId>net.md-5</groupId>
@ -65,26 +81,8 @@
<version>1.12-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- LuckPerms Common -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-common</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<!-- LuckPerms API -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-api</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<scope>provided</scope>
</dependency>
<!-- RedisBungee -->
<dependency>
<groupId>com.imaginarycode.minecraft</groupId>
@ -92,8 +90,6 @@
<version>0.4</version>
<scope>provided</scope>
</dependency>
<!-- ************** Migration Plugins ************** -->
<!-- BungeePerms -->
<dependency>
<groupId>net.alpenblock</groupId>

View File

@ -28,13 +28,22 @@
</build>
<dependencies>
<!-- LuckPerms API -->
<!-- api -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-api</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<!-- jsr305 -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<scope>provided</scope>
</dependency>
<!-- text -->
<dependency>
<groupId>net.kyori</groupId>
@ -60,13 +69,37 @@
</exclusion>
</exclusions>
</dependency>
<!-- gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.7</version>
<scope>provided</scope>
</dependency>
<!-- guava -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
<scope>provided</scope>
</dependency>
<!-- caffeine -->
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<version>2.6.0</version>
<scope>provided</scope>
</dependency>
<!-- configurate -->
<dependency>
<groupId>ninja.leaping.configurate</groupId>
<artifactId>configurate-core</artifactId>
<version>3.3</version>
<scope>compile</scope>
<optional>true</optional>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
@ -74,6 +107,7 @@
</exclusion>
</exclusions>
</dependency>
<!-- configurate yaml -->
<dependency>
<groupId>ninja.leaping.configurate</groupId>
<artifactId>configurate-yaml</artifactId>
@ -86,6 +120,7 @@
</exclusion>
</exclusions>
</dependency>
<!-- configurate gson -->
<dependency>
<groupId>ninja.leaping.configurate</groupId>
<artifactId>configurate-gson</artifactId>
@ -98,6 +133,7 @@
</exclusion>
</exclusions>
</dependency>
<!-- configurate hocon -->
<dependency>
<groupId>ninja.leaping.configurate</groupId>
<artifactId>configurate-hocon</artifactId>
@ -132,33 +168,6 @@
<version>1.14</version>
<scope>provided</scope>
</dependency>
<!-- gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.7</version>
<scope>provided</scope>
</dependency>
<!-- guava -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
<scope>provided</scope>
</dependency>
<!-- caffeine -->
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<version>2.6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -12,7 +12,6 @@
<module>api</module>
<module>common</module>
<module>bukkit</module>
<module>bukkit-legacy</module>
<module>bungee</module>
<module>sponge/sponge-service</module>
<module>sponge/sponge-service-api6</module>

View File

@ -71,48 +71,43 @@
</build>
<dependencies>
<!-- LP Sponge Model -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-sponge-service</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<!-- LP Sponge Proxy for API6 -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-sponge-service-api6</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<!-- LP Sponge Proxy for API7 -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-sponge-service-api7</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<!-- Sponge API -->
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
<!-- LuckPerms Common -->
<!-- common -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-common</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<!-- LuckPerms API -->
<!-- sponge service model -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-api</artifactId>
<artifactId>luckperms-sponge-service</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<!-- api6 proxy -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-sponge-service-api6</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<!-- api7 proxy -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-sponge-service-api7</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<!-- Sponge -->
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -29,28 +29,23 @@
</build>
<dependencies>
<!-- Sponge Model -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-sponge-service</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<!-- LuckPerms Common -->
<!-- common -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-common</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<!-- LuckPerms API -->
<!-- sponge service model -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-api</artifactId>
<artifactId>luckperms-sponge-service</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<!-- Sponge API -->
<!-- Sponge -->
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId>

View File

@ -29,32 +29,27 @@
</build>
<dependencies>
<!-- Sponge Model -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-sponge-service</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<!-- LuckPerms Common -->
<!-- common -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-common</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<!-- LuckPerms API -->
<!-- sponge service model -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-api</artifactId>
<artifactId>luckperms-sponge-service</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<!-- Sponge API -->
<!-- Sponge -->
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId>
<version>7.0.0-SNAPSHOT</version>
<version>7.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>

View File

@ -29,28 +29,23 @@
</build>
<dependencies>
<!-- Sponge API -->
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId>
<version>7.0.0-SNAPSHOT</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<!-- LuckPerms Common -->
<!-- common -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-common</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<!-- LuckPerms API -->
<!-- Sponge -->
<dependency>
<groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-api</artifactId>
<version>${project.version}</version>
<groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId>
<version>7.0.0</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<!-- guava -->
<dependency>
<groupId>com.google.guava</groupId>