Updated dependencies, including Kotlin

This commit is contained in:
Will FP
2023-12-03 15:22:32 +00:00
parent e2d2e955a4
commit 24d9052080
13 changed files with 29 additions and 18 deletions

View File

@@ -4,7 +4,7 @@ buildscript {
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.21")
}
}
@@ -13,7 +13,7 @@ plugins {
id("com.github.johnrengelman.shadow") version "8.1.1"
id("maven-publish")
id("java")
kotlin("jvm") version "1.7.10"
kotlin("jvm") version "1.9.21"
}
dependencies {
@@ -92,16 +92,16 @@ allprojects {
dependencies {
// Kotlin
implementation(kotlin("stdlib", version = "1.7.10"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2")
implementation(kotlin("stdlib", version = "1.9.21"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
// Included in spigot jar, no need to move to implementation
compileOnly("org.jetbrains:annotations:23.0.0")
compileOnly("com.google.guava:guava:31.1-jre")
// Test
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.2")
// Adventure
implementation("net.kyori:adventure-api:4.10.1")
@@ -111,8 +111,8 @@ allprojects {
implementation("net.kyori:adventure-text-serializer-legacy:4.10.1")
// Other
implementation("com.github.ben-manes.caffeine:caffeine:3.1.0")
implementation("org.apache.maven:maven-artifact:3.8.5")
implementation("com.github.ben-manes.caffeine:caffeine:3.1.5")
implementation("org.apache.maven:maven-artifact:3.9.0")
}
tasks.withType<JavaCompile> {

View File

@@ -4,6 +4,7 @@ dependencies {
// Other
compileOnly("org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT")
compileOnly("commons-lang:commons-lang:2.6")
compileOnly("com.comphenix.protocol:ProtocolLib:4.6.1-SNAPSHOT")
compileOnly("com.google.code.gson:gson:2.8.8")
}

View File

@@ -196,6 +196,7 @@ public interface SlotBuilder {
* @deprecated Use {@link SlotBuilder#setUpdater(SlotUpdater)} instead.
*/
@Deprecated
@SuppressWarnings("DeprecatedIsStillUsed")
default SlotBuilder setModifier(@NotNull SlotModifier modifier) {
return setUpdater((player, menu, previous) -> {
modifier.modify(player, menu, previous);

View File

@@ -150,6 +150,7 @@ public final class PlaceholderManager {
*/
@Deprecated(since = "6.56.0", forRemoval = true)
@NotNull
@SuppressWarnings("DeprecatedIsStillUsed")
public static String translatePlaceholders(@NotNull final String text,
@Nullable final Player player) {
return translatePlaceholders(text, player, EMPTY_INJECTABLE);
@@ -166,6 +167,7 @@ public final class PlaceholderManager {
*/
@Deprecated(since = "6.56.0", forRemoval = true)
@NotNull
@SuppressWarnings("DeprecatedIsStillUsed")
public static String translatePlaceholders(@NotNull final String text,
@Nullable final Player player,
@NotNull final PlaceholderInjectable context) {
@@ -192,6 +194,7 @@ public final class PlaceholderManager {
*/
@Deprecated(since = "6.56.0", forRemoval = true)
@NotNull
@SuppressWarnings("DeprecatedIsStillUsed")
public static String translatePlaceholders(@NotNull final String text,
@Nullable final Player player,
@NotNull final PlaceholderInjectable context,

View File

@@ -1,13 +1,13 @@
package com.willfp.eco.core.web;
import com.willfp.eco.core.EcoPlugin;
import org.bukkit.util.Consumer;
import org.jetbrains.annotations.NotNull;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Scanner;
import java.util.function.Consumer;
/**
* Class to check for updates of a plugin on spigot.

View File

@@ -13,6 +13,7 @@ public final class PotionUtils {
* @param data The data.
* @return The duration.
*/
@SuppressWarnings("deprecation")
public static int getDuration(@NotNull final PotionData data) {
if (data.isExtended()) {
return switch (data.getType()) {

View File

@@ -2,8 +2,8 @@
package com.willfp.eco.util
import org.bukkit.potion.PotionData
/** @see PotionData.duration */
val PotionData.duration: Int
/** @see PotionUtils.getDuration */
@Suppress("DEPRECATION")
val org.bukkit.potion.PotionData.duration: Int
get() = PotionUtils.getDuration(this)

View File

@@ -30,7 +30,12 @@ class DisplayName : DisplayNameProxy {
.apply { isAccessible = true }
.get(null) as EntityDataAccessor<Boolean>
override fun setClientsideDisplayName(entity: LivingEntity, player: Player, displayName: Component, visible: Boolean) {
override fun setClientsideDisplayName(
entity: LivingEntity,
player: Player,
displayName: Component,
visible: Boolean
) {
if (entity !is CraftLivingEntity) {
return
}
@@ -53,7 +58,7 @@ class DisplayName : DisplayNameProxy {
player.sendPacket(Packet(packet))
}
private fun <T> SynchedEntityData.forceSet(
private fun <T : Any> SynchedEntityData.forceSet(
accessor: EntityDataAccessor<T>,
value: T
) {

View File

@@ -55,7 +55,7 @@ class DisplayName : DisplayNameProxy {
player.sendPacket(Packet(packet))
}
private fun <T> SynchedEntityData.forceSet(
private fun <T: Any> SynchedEntityData.forceSet(
accessor: EntityDataAccessor<T>,
value: T
) {

View File

@@ -74,6 +74,7 @@ tasks {
minimize {
exclude(dependency("org.litote.kmongo:kmongo-coroutine:.*"))
exclude(dependency("org.jetbrains.exposed:.*:.*"))
exclude(dependency("com.willfp:ModelEngineBridge:.*"))
}
}

View File

@@ -1,4 +1,4 @@
package com.mongodb.diagnostics.logging
package com.mongodb.internal.diagnostics.logging
/*
This is a terrible fix for mongo logging.

View File

@@ -1,3 +1,2 @@
version = 6.67.0
plugin-name = eco
kotlin.code.style = official
kotlin.incremental.useClasspathSnapshot=false