-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEALibrary.java
More file actions
68 lines (60 loc) · 2.51 KB
/
Copy pathEALibrary.java
File metadata and controls
68 lines (60 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package gg.eventalerts.eventalertsintegration;
import org.jetbrains.annotations.NotNull;
import xyz.srnyx.annoyingapi.AnnoyingPlugin;
import xyz.srnyx.annoyingapi.library.AnnoyingLibrary;
import xyz.srnyx.annoyingapi.libs.libby.Library;
import xyz.srnyx.annoyingapi.libs.libby.Repositories;
import xyz.srnyx.annoyingapi.libs.libby.relocation.Relocation;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.function.Function;
import java.util.function.Supplier;
public enum EALibrary implements AnnoyingLibrary {
/**
* {@code org.java-websocket:Java-WebSocket}
*/
JAVA_WEBSOCKET(
() -> Library.builder()
.repository(Repositories.MAVEN_CENTRAL)
.groupId("org{}java-websocket")
.artifactId("Java-WebSocket")
.version(BuildProperties.JAVA_WEBSOCKET_VERSION),
plugin -> Collections.singleton(plugin.getRelocation("org{}java_websocket"))),
/**
* {@code org.mongodb:bson}
*/
BSON(
() -> Library.builder()
.repository(Repositories.MAVEN_CENTRAL)
.groupId("org{}mongodb")
.artifactId("bson")
.version(BuildProperties.BSON_VERSION),
plugin -> List.of(
plugin.getRelocation("org{}bson"),
plugin.getRelocation("org{}checkerframework"))), //TODO not sure if should include checkerframework here
/**
* {@code net.fellbaum:jememoji}
*/
JEMOJI(
() -> Library.builder()
.repository(Repositories.MAVEN_CENTRAL)
.groupId("net{}fellbaum")
.artifactId("jemoji")
.version(BuildProperties.JEMOJI_VERSION),
plugin -> Collections.singleton(plugin.getRelocation("net{}fellbaum")));
@NotNull public final Supplier<Library.Builder> librarySupplier;
@NotNull public final Function<AnnoyingPlugin, Collection<Relocation>> relocations;
EALibrary(@NotNull Supplier<Library.Builder> librarySupplier, @NotNull Function<AnnoyingPlugin, Collection<Relocation>> relocations) {
this.librarySupplier = librarySupplier;
this.relocations = relocations;
}
@Override @NotNull
public Supplier<Library.Builder> getLibrarySupplier() {
return librarySupplier;
}
@Override @NotNull
public Function<AnnoyingPlugin, Collection<Relocation>> getRelocations() {
return relocations;
}
}