feat: 添加 lettuce API
This commit is contained in:
@@ -1,20 +1,23 @@
|
||||
@file:Suppress("VulnerableLibrariesLocal", "GradlePackageUpdate", "GradlePackageVersionRange")
|
||||
|
||||
plugins {
|
||||
id("java-library")
|
||||
}
|
||||
@file:Suppress("VulnerableLibrariesLocal")
|
||||
|
||||
dependencies {
|
||||
compileOnly("com.google.code.gson:gson:2.8.0")
|
||||
|
||||
api("net.kyori:adventure-platform-api:4+") {
|
||||
implementation("net.kyori:adventure-platform-api:4.3.2") {
|
||||
exclude(group = "org.jetbrains")
|
||||
}
|
||||
api("net.kyori:adventure-text-serializer-gson:4.13+") {
|
||||
implementation("net.kyori:adventure-text-serializer-gson:4.13.1") {
|
||||
exclude(group = "org.jetbrains")
|
||||
exclude(group = "com.google.code.gson")
|
||||
}
|
||||
implementation("org.quartz-scheduler:quartz:2.3.2") { isTransitive = false }
|
||||
|
||||
// https://mvnrepository.com/artifact/io.lettuce/lettuce-core
|
||||
implementation("io.lettuce:lettuce-core:6.3.1.RELEASE") {
|
||||
exclude(group = "io.netty")
|
||||
}
|
||||
implementation("org.quartz-scheduler:quartz:2.3.2") {
|
||||
isTransitive = false
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
@@ -2,6 +2,7 @@ package cn.hamster3.mc.plugin.core.common.api;
|
||||
|
||||
import cn.hamster3.mc.plugin.core.common.thread.NamedThreadFactory;
|
||||
import com.google.gson.Gson;
|
||||
import io.lettuce.core.RedisClient;
|
||||
import lombok.Getter;
|
||||
import net.kyori.adventure.platform.AudienceProvider;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -55,6 +56,12 @@ public abstract class CoreAPI {
|
||||
return getDataSource().getConnection();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return lettuce redis 客户端
|
||||
*/
|
||||
@NotNull
|
||||
public abstract RedisClient getRedisClient();
|
||||
|
||||
/**
|
||||
* @return GSON 工具
|
||||
*/
|
||||
|
Reference in New Issue
Block a user