Skip to content

Commit 829ba79

Browse files
author
games647
authored
Merge pull request TuxCoding#659 from AlbeMiglio/main
Added latest Guava and SLF4J compatibility
2 parents 15fee92 + 1dd27ff commit 829ba79

7 files changed

Lines changed: 52 additions & 9 deletions

File tree

bukkit/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@
6868
<pattern>com.google.gson</pattern>
6969
<shadedPattern>fastlogin.gson</shadedPattern>
7070
</relocation>
71+
<relocation>
72+
<pattern>com.google.common</pattern>
73+
<shadedPattern>fastlogin.guava</shadedPattern>
74+
</relocation>
7175
<relocation>
7276
<pattern>io.papermc.lib</pattern>
7377
<shadedPattern>fastlogin.paperlib</shadedPattern>

bungee/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
<!--Those classes are already present in BungeeCord version-->
5858
<exclude>net.md-5:bungeecord-config</exclude>
5959
<exclude>com.google.code.gson:gson</exclude>
60+
<exclude>com.google.guava:guava</exclude>
6061
</excludes>
6162
</artifactSet>
6263
<relocations>

core/pom.xml

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@
7474
<dependency>
7575
<groupId>org.slf4j</groupId>
7676
<artifactId>slf4j-jdk14</artifactId>
77-
<version>1.7.32</version>
77+
<version>2.0.0-alpha5</version>
7878
</dependency>
7979

8080
<!-- snakeyaml is present in Bungee, Spigot, Cauldron and so we could use this independent implementation -->
8181
<dependency>
8282
<groupId>net.md-5</groupId>
8383
<artifactId>bungeecord-config</artifactId>
84-
<version>1.12-SNAPSHOT</version>
84+
<version>1.16-R0.4</version>
8585
<exclusions>
8686
<exclusion>
8787
<groupId>*</groupId>
@@ -113,18 +113,53 @@
113113
<version>0.4</version>
114114
</dependency>
115115

116-
<!-- APIs we can use because they are available in all platforms (Spigot, Bungee) -->
116+
<!-- APIs we can use because they are available in all platforms (Spigot, Bungee, Velocity) -->
117117
<dependency>
118118
<groupId>com.google.guava</groupId>
119119
<artifactId>guava</artifactId>
120-
<version>17.0</version>
121-
<scope>provided</scope>
120+
<!-- Old version for velocity -->
121+
<version>25.1-jre</version>
122+
<!-- Exclude compile time deps not marked as such on upstream -->
123+
<exclusions>
124+
<exclusion>
125+
<groupId>com.google.code.findbugs</groupId>
126+
<artifactId>jsr305</artifactId>
127+
</exclusion>
128+
<exclusion>
129+
<groupId>org.checkerframework</groupId>
130+
<artifactId>checker-qual</artifactId>
131+
</exclusion>
132+
<exclusion>
133+
<groupId>com.google.errorprone</groupId>
134+
<artifactId>error_prone_annotations</artifactId>
135+
</exclusion>
136+
<exclusion>
137+
<groupId>com.google.j2objc</groupId>
138+
<artifactId>j2objc-annotations</artifactId>
139+
</exclusion>
140+
<exclusion>
141+
<groupId>org.codehaus.mojo</groupId>
142+
<artifactId>animal-sniffer-annotations</artifactId>
143+
</exclusion>
144+
</exclusions>
122145
</dependency>
123146

124147
<dependency>
125148
<groupId>com.google.code.gson</groupId>
126149
<artifactId>gson</artifactId>
127-
<version>2.2.4</version>
150+
<version>2.8.9</version>
151+
</dependency>
152+
153+
<dependency>
154+
<groupId>org.slf4j</groupId>
155+
<artifactId>slf4j-api</artifactId>
156+
<version>2.0.0-alpha5</version>
157+
</dependency>
158+
<dependency>
159+
<groupId>org.slf4j</groupId>
160+
<artifactId>slf4j-simple</artifactId>
161+
<version>2.0.0-alpha5</version>
162+
<scope>runtime</scope>
128163
</dependency>
129164
</dependencies>
130165
</project>

core/src/main/java/com/github/games647/fastlogin/core/CommonUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
import org.slf4j.Logger;
3737
import org.slf4j.LoggerFactory;
38-
import org.slf4j.impl.JDK14LoggerAdapter;
38+
import org.slf4j.jul.JDK14LoggerAdapter;
3939

4040
public class CommonUtil {
4141

core/src/main/java/com/github/games647/fastlogin/core/shared/FastLoginCore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public void load() {
126126
Set<Proxy> proxies = config.getStringList("proxies")
127127
.stream()
128128
.map(HostAndPort::fromString)
129-
.map(proxy -> new InetSocketAddress(proxy.getHostText(), proxy.getPort()))
129+
.map(proxy -> new InetSocketAddress(proxy.getHost(), proxy.getPort()))
130130
.map(sa -> new Proxy(Type.HTTP, sa))
131131
.collect(toSet());
132132

core/src/main/java/com/github/games647/fastlogin/core/shared/LoginSession.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
package com.github.games647.fastlogin.core.shared;
2727

2828
import com.github.games647.fastlogin.core.StoredProfile;
29+
import com.google.common.base.MoreObjects;
2930
import com.google.common.base.Objects;
3031

3132
import java.util.UUID;
@@ -91,7 +92,7 @@ public synchronized void setUuid(UUID uuid) {
9192

9293
@Override
9394
public synchronized String toString() {
94-
return Objects.toStringHelper(this)
95+
return MoreObjects.toStringHelper(this)
9596
.add("profile", profile)
9697
.add("requestUsername", requestUsername)
9798
.add("username", username)

velocity/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@
8585
<excludes>
8686
<exclude>org.slf4j:*</exclude>
8787
<exclude>com.google.code.gson:gson</exclude>
88+
<!-- Ships the same old version -->
89+
<exclude>com.google.guava:guava</exclude>
8890
</excludes>
8991
</artifactSet>
9092
</configuration>

0 commit comments

Comments
 (0)