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> <version>19.0</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- jsr305 -->
<dependency> <dependency>
<groupId>com.google.code.findbugs</groupId> <groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId> <artifactId>jsr305</artifactId>

View File

@ -242,7 +242,16 @@ public class Contexts {
} }
private int calculateHashCode() { 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 @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> </build>
<dependencies> <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> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId> <artifactId>spigot-api</artifactId>
<version>1.12.2-R0.1-SNAPSHOT</version> <version>1.12.2-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- Vault --> <!-- Vault -->
<dependency> <dependency>
<groupId>net.milkbowl.vault</groupId> <groupId>net.milkbowl.vault</groupId>
@ -78,26 +96,6 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </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 --> <!-- LilyPad -->
<dependency> <dependency>
<groupId>lilypad.client.connect</groupId> <groupId>lilypad.client.connect</groupId>
@ -105,7 +103,6 @@
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- ************** Migration Plugins ************** -->
<!-- zPermissions --> <!-- zPermissions -->
<dependency> <dependency>
<groupId>org.tyrannyofheaven.bukkit</groupId> <groupId>org.tyrannyofheaven.bukkit</groupId>

View File

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

View File

@ -58,6 +58,22 @@
</build> </build>
<dependencies> <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 --> <!-- BungeeCord -->
<dependency> <dependency>
<groupId>net.md-5</groupId> <groupId>net.md-5</groupId>
@ -65,26 +81,8 @@
<version>1.12-SNAPSHOT</version> <version>1.12-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </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 --> <!-- RedisBungee -->
<dependency> <dependency>
<groupId>com.imaginarycode.minecraft</groupId> <groupId>com.imaginarycode.minecraft</groupId>
@ -92,8 +90,6 @@
<version>0.4</version> <version>0.4</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- ************** Migration Plugins ************** -->
<!-- BungeePerms --> <!-- BungeePerms -->
<dependency> <dependency>
<groupId>net.alpenblock</groupId> <groupId>net.alpenblock</groupId>

View File

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

View File

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

View File

@ -71,48 +71,43 @@
</build> </build>
<dependencies> <dependencies>
<!-- LP Sponge Model --> <!-- common -->
<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 -->
<dependency> <dependency>
<groupId>me.lucko.luckperms</groupId> <groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-common</artifactId> <artifactId>luckperms-common</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<!-- LuckPerms API -->
<!-- sponge service model -->
<dependency> <dependency>
<groupId>me.lucko.luckperms</groupId> <groupId>me.lucko.luckperms</groupId>
<artifactId>luckperms-api</artifactId> <artifactId>luckperms-sponge-service</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </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> </dependencies>
</project> </project>

View File

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

View File

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

View File

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