Skip to content

Commit

Permalink
Updated dependencies, including Kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
WillFP committed Dec 3, 2023
1 parent e2d2e95 commit 24d9052
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 18 deletions.
16 changes: 8 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand All @@ -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 {
Expand Down Expand Up @@ -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")
Expand All @@ -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> {
Expand Down
1 change: 1 addition & 0 deletions eco-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ default SlotBuilder setCaptive() {
* @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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public static String getResult(@Nullable final EcoPlugin plugin,
*/
@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);
Expand All @@ -166,6 +167,7 @@ public static String translatePlaceholders(@NotNull final String text,
*/
@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) {
Expand All @@ -192,6 +194,7 @@ public static String translatePlaceholders(@NotNull final String text,
*/
@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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
1 change: 1 addition & 0 deletions eco-api/src/main/java/com/willfp/eco/util/PotionUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
6 changes: 3 additions & 3 deletions eco-api/src/main/kotlin/com/willfp/eco/util/PotionUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
) {
Expand Down
1 change: 1 addition & 0 deletions eco-core/core-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ tasks {
minimize {
exclude(dependency("org.litote.kmongo:kmongo-coroutine:.*"))
exclude(dependency("org.jetbrains.exposed:.*:.*"))
exclude(dependency("com.willfp:ModelEngineBridge:.*"))
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mongodb.diagnostics.logging
package com.mongodb.internal.diagnostics.logging

/*
This is a terrible fix for mongo logging.
Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
version = 6.67.0
plugin-name = eco
kotlin.code.style = official
kotlin.incremental.useClasspathSnapshot=false
Binary file renamed lib/fabledskyblock3.jar → lib/FabledSkyblock-3.jar
Binary file not shown.

0 comments on commit 24d9052

Please sign in to comment.