Use guava 21, add 1.12 support
This commit is contained in:
parent
9385fc8f4c
commit
00699ed7fb
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
##### Running requirements:
|
##### Running requirements:
|
||||||
>- Java 1.8
|
>- Java 1.8
|
||||||
>- TacoSpigot, PaperSpigot or Spigot (1.7.10, 1.8.X, 1.9.X, 1.10.X, 1.11.X)<br>
|
>- TacoSpigot, PaperSpigot or Spigot (1.7.10, 1.8.X, 1.9.X, 1.10.X, 1.11.X, 1.12.X)<br>
|
||||||
(In case you use Thermos, Cauldron or similar, you have to update the SpecialSource library to support Java 8 plugins.
|
(In case you use Thermos, Cauldron or similar, you have to update the SpecialSource library to support Java 8 plugins.
|
||||||
HowTo: https://github.com/games647/FastLogin/issues/111#issuecomment-272331347)
|
HowTo: https://github.com/games647/FastLogin/issues/111#issuecomment-272331347)
|
||||||
>- ProtocolLib (optional, required by some features)
|
>- ProtocolLib (optional, required by some features)
|
||||||
|
|||||||
8
pom.xml
8
pom.xml
@ -220,7 +220,7 @@
|
|||||||
than already loaded libs (i.e. by Mojang -> gson)
|
than already loaded libs (i.e. by Mojang -> gson)
|
||||||
-->
|
-->
|
||||||
<executions>
|
<executions>
|
||||||
<!-- Spigot 1.8+ -->
|
<!-- Spigot 1.12+ -->
|
||||||
<execution>
|
<execution>
|
||||||
<id>spigot-shade</id>
|
<id>spigot-shade</id>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
@ -281,7 +281,7 @@
|
|||||||
<outputFile>target/${project.finalName}-spigot.jar</outputFile>
|
<outputFile>target/${project.finalName}-spigot.jar</outputFile>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
<!-- 1.7.10 and lower -->
|
<!-- 1.11.2 and lower -->
|
||||||
<execution>
|
<execution>
|
||||||
<id>legacy-shade</id>
|
<id>legacy-shade</id>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
@ -290,7 +290,7 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<relocations>
|
<relocations>
|
||||||
<!-- Include all google libraries, because they are not available before 1.8 -->
|
<!-- Include all google libraries, because they are not available before 1.12 -->
|
||||||
<relocation>
|
<relocation>
|
||||||
<pattern>com.google</pattern>
|
<pattern>com.google</pattern>
|
||||||
<shadedPattern>fr.xephi.authme.libs.google</shadedPattern>
|
<shadedPattern>fr.xephi.authme.libs.google</shadedPattern>
|
||||||
@ -469,7 +469,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
<artifactId>guava</artifactId>
|
<artifactId>guava</artifactId>
|
||||||
<version>17.0</version>
|
<version>21.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package fr.xephi.authme.data.auth;
|
|||||||
import fr.xephi.authme.security.crypts.HashedPassword;
|
import fr.xephi.authme.security.crypts.HashedPassword;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.firstNonNull;
|
import static com.google.common.base.MoreObjects.firstNonNull;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import ch.jalu.configme.migration.PlainMigrationService;
|
|||||||
import ch.jalu.configme.properties.Property;
|
import ch.jalu.configme.properties.Property;
|
||||||
import ch.jalu.configme.properties.StringListProperty;
|
import ch.jalu.configme.properties.StringListProperty;
|
||||||
import ch.jalu.configme.resource.PropertyResource;
|
import ch.jalu.configme.resource.PropertyResource;
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.MoreObjects;
|
||||||
import fr.xephi.authme.ConsoleLogger;
|
import fr.xephi.authme.ConsoleLogger;
|
||||||
import fr.xephi.authme.initialization.DataFolder;
|
import fr.xephi.authme.initialization.DataFolder;
|
||||||
import fr.xephi.authme.output.LogLevel;
|
import fr.xephi.authme.output.LogLevel;
|
||||||
@ -203,7 +203,7 @@ public class SettingsMigrationService extends PlainMigrationService {
|
|||||||
final Property<LogLevel> newProperty = PluginSettings.LOG_LEVEL;
|
final Property<LogLevel> newProperty = PluginSettings.LOG_LEVEL;
|
||||||
if (!newProperty.isPresent(resource) && resource.contains(oldPath)) {
|
if (!newProperty.isPresent(resource) && resource.contains(oldPath)) {
|
||||||
ConsoleLogger.info("Moving '" + oldPath + "' to '" + newProperty.getPath() + "'");
|
ConsoleLogger.info("Moving '" + oldPath + "' to '" + newProperty.getPath() + "'");
|
||||||
boolean oldValue = Objects.firstNonNull(resource.getBoolean(oldPath), false);
|
boolean oldValue = MoreObjects.firstNonNull(resource.getBoolean(oldPath), false);
|
||||||
LogLevel level = oldValue ? LogLevel.INFO : LogLevel.FINE;
|
LogLevel level = oldValue ? LogLevel.INFO : LogLevel.FINE;
|
||||||
resource.setValue(newProperty.getPath(), level.name());
|
resource.setValue(newProperty.getPath(), level.name());
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package fr.xephi.authme.datasource;
|
package fr.xephi.authme.datasource;
|
||||||
|
|
||||||
import ch.jalu.configme.properties.Property;
|
import ch.jalu.configme.properties.Property;
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.MoreObjects;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
@ -143,7 +143,7 @@ public abstract class AbstractResourceClosingTest {
|
|||||||
// Use XFBCRYPT if nothing else specified as there is a lot of specific behavior to this hash algorithm in MySQL
|
// Use XFBCRYPT if nothing else specified as there is a lot of specific behavior to this hash algorithm in MySQL
|
||||||
final HashAlgorithm[] defaultAlgorithm = new HashAlgorithm[]{HashAlgorithm.XFBCRYPT};
|
final HashAlgorithm[] defaultAlgorithm = new HashAlgorithm[]{HashAlgorithm.XFBCRYPT};
|
||||||
for (Method method : methods) {
|
for (Method method : methods) {
|
||||||
HashAlgorithm[] algorithms = Objects.firstNonNull(CUSTOM_ALGORITHMS.get(method.getName()), defaultAlgorithm);
|
HashAlgorithm[] algorithms = MoreObjects.firstNonNull(CUSTOM_ALGORITHMS.get(method.getName()), defaultAlgorithm);
|
||||||
for (HashAlgorithm algorithm : algorithms) {
|
for (HashAlgorithm algorithm : algorithms) {
|
||||||
data.add(new Object[]{method, method.getName(), algorithm});
|
data.add(new Object[]{method, method.getName(), algorithm});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import java.util.Arrays;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.firstNonNull;
|
import static com.google.common.base.MoreObjects.firstNonNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates the translations page in docs.
|
* Generates the translations page in docs.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user