-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEALibrary.java
More file actions
158 lines (150 loc) · 6.45 KB
/
Copy pathEALibrary.java
File metadata and controls
158 lines (150 loc) · 6.45 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
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 eu.okaeri:okaeri-configs-core}
*/
OKAERI_CONFIGS_CORE(
() -> Library.builder()
.repository("https://repo.okaeri.cloud/releases/")
.groupId("eu{}okaeri")
.artifactId("okaeri-configs-core")
.version(BuildProperties.OKAERI_CONFIGS_VERSION),
plugin -> Collections.singleton(plugin.getRelocation("eu{}okaeri"))),
/**
* {@code eu.okaeri:okaeri-configs-yaml-bukkit}
*/
OKAERI_CONFIGS_YAML_BUKKIT(
() -> Library.builder()
.repository("https://repo.okaeri.cloud/releases/")
.groupId("eu{}okaeri")
.artifactId("okaeri-configs-yaml-bukkit")
.version(BuildProperties.OKAERI_CONFIGS_VERSION),
plugin -> Collections.singleton(plugin.getRelocation("eu{}okaeri"))),
/**
* {@code eu.okaeri:okaeri-configs-serdes-commons}
*/
OKAERI_CONFIGS_SERDES_COMMONS(
() -> Library.builder()
.repository("https://repo.okaeri.cloud/releases/")
.groupId("eu{}okaeri")
.artifactId("okaeri-configs-serdes-commons")
.version(BuildProperties.OKAERI_CONFIGS_VERSION),
plugin -> Collections.singleton(plugin.getRelocation("eu{}okaeri"))),
/**
* {@code eu.okaeri:okaeri-configs-serdes-bukkit}
*/
OKAERI_CONFIGS_SERDES_BUKKIT(
() -> Library.builder()
.repository("https://repo.okaeri.cloud/releases/")
.groupId("eu{}okaeri")
.artifactId("okaeri-configs-serdes-bukkit")
.version(BuildProperties.OKAERI_CONFIGS_VERSION),
plugin -> Collections.singleton(plugin.getRelocation("eu{}okaeri"))),
/**
* {@code eu.okaeri:okaeri-validator}
*/
OKAERI_VALIDATOR(
() -> Library.builder()
.repository("https://repo.okaeri.cloud/releases/")
.groupId("eu{}okaeri")
.artifactId("okaeri-validator")
.version("2.0.5"),
plugin -> Collections.singleton(plugin.getRelocation("eu{}okaeri"))),
/**
* {@code eu.okaeri:okaeri-configs-validator-okaeri}
*/
OKAERI_CONFIGS_VALIDATOR_OKAERI(
() -> Library.builder()
.repository("https://repo.okaeri.cloud/releases/")
.groupId("eu{}okaeri")
.artifactId("okaeri-configs-validator-okaeri")
.version(BuildProperties.OKAERI_CONFIGS_VERSION),
plugin -> Collections.singleton(plugin.getRelocation("eu{}okaeri"))),
/**
* {@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 dev.triumphteam:nova}
*/
NOVA(
() -> Library.builder()
.repository("https://repo.triumphteam.dev/snapshots/")
.groupId("dev{}triumphteam")
.artifactId("nova")
.version("1.0.0-SNAPSHOT"),
plugin -> Collections.singleton(plugin.getRelocation("dev{}triumphteam"))),
/**
* {@code dev.triumphteam:triumph-gui-core}
*/
TRIUMPH_GUI_CORE(
() -> Library.builder()
.repository("https://repo.triumphteam.dev/snapshots/")
.groupId("dev{}triumphteam")
.artifactId("triumph-gui-core")
.version(BuildProperties.TRIUMPH_GUI_VERSION),
plugin -> Collections.singleton(plugin.getRelocation("dev{}triumphteam"))),
/**
* {@code dev.triumphteam:triumph-gui-paper}
*/
TRIUMPH_GUI_PAPER(
() -> Library.builder()
.repository("https://repo.triumphteam.dev/snapshots/")
.groupId("dev{}triumphteam")
.artifactId("triumph-gui-paper")
.version(BuildProperties.TRIUMPH_GUI_VERSION),
plugin -> Collections.singleton(plugin.getRelocation("dev{}triumphteam"))),
/**
* {@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;
}
}