Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
- Update Gradle to 8.7
- Update Kotlin to 1.9.24
- Update kord to 0.13.1
- Update kotlin-logging to 6.0.9
- Update slf4j-simple to 2.0.13
- Update kotlin-node to 20.11.30-pre.742
- Update lavalink-protocol to 4.0.5
- Update lyrics-protocol to 2.4.5
- Update kotlinpoet to 1.16.0
- Update kotlinx-atomicfu to 0.24.0
- Update org.ajoberstar.git-publish to 4.2.2
- Update kotlinx.coroutines to 1.8.1
- Update kotlinx-serialization-json to 1.6.3
- Update kotlinx-datetime to 0.5.0
- Update ktor to 2.3.11
- Switch to okhttp
- Update ksp to 1.9.25-1.9.20
  • Loading branch information
DRSchlaubi committed May 10, 2024
1 parent d43efcc commit d29bb04
Show file tree
Hide file tree
Showing 17 changed files with 71 additions and 61 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 20
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 20

java-version: 22
- uses: gradle/actions/setup-gradle@v3
- name: Publish docs with Gradle
run: gradle gitPublishPush
26 changes: 11 additions & 15 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,17 @@ jobs:
steps:
- run: export GRADLE_USER_HOME=`pwd`/.gradle
- run: echo "name=RELEASE_TAG::${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Java JDK 20
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 20
java-version: 22
- uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: assemble
run: ./gradlew assemble
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: jvmTest
run: ./gradlew jvmTest
release:
name: Publish artifacts
runs-on: ubuntu-20.04
Expand All @@ -42,15 +39,14 @@ jobs:
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.signingKey }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.signingPassword }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 20
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 20
java-version: 22
- uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: publishAllPublicationsToMavenRepository
run: ./gradlew publishAllPublicationsToMavenRepository
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
}

group = "dev.schlaubi.lavakord"
version = "6.1.3"
version = "6.2.0"

allprojects {
repositories {
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ repositories {
}

dependencies {
val kotlinVersion = "1.9.21"
val kotlinVersion = "1.9.24"
implementation(kotlin("gradle-plugin", kotlinVersion))
implementation(kotlin("serialization", kotlinVersion))
implementation(kotlin("gradle-plugin-api", kotlinVersion))
implementation("com.vanniktech:gradle-maven-publish-plugin:0.25.3")
implementation("com.vanniktech:gradle-maven-publish-plugin:0.28.0")
implementation("org.jetbrains.dokka", "dokka-gradle-plugin", "1.9.10")
implementation(gradleApi())
implementation(localGroovy())
Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/lavalink-module.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ kotlin {
nodejs()
// browser() doesn't work because the js websocket client does not allowed you to set headers
// Apart from that why would you need Lavalink in your browser?
useCommonJs()
}

targets.all {
Expand Down
3 changes: 2 additions & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ kotlin {

jvmMain {
dependencies {
implementation(libs.ktor.client.cio)
implementation(libs.ktor.client.okhttp)
}
}

Expand All @@ -63,6 +63,7 @@ kotlin {
jsMain {
dependencies {
implementation(libs.ktor.client.js)
implementation(libs.codegen.ksp.annotations)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import dev.schlaubi.lavakord.rest.getInfo
import dev.schlaubi.lavakord.rest.getVersion
import dev.schlaubi.lavakord.rest.routes.V4Api
import dev.schlaubi.lavakord.rest.updateSession
import io.github.oshai.kotlinlogging.KotlinLogging
import io.ktor.client.plugins.*
import io.ktor.client.plugins.resources.Resources
import io.ktor.client.plugins.websocket.*
import io.ktor.client.request.*
import io.ktor.http.*
import io.ktor.resources.*
import io.ktor.serialization.*
import io.ktor.websocket.*
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.DelicateCoroutinesApi
Expand All @@ -33,7 +33,6 @@ import kotlinx.serialization.json.JsonElement
import kotlinx.serialization.json.decodeFromJsonElement
import kotlinx.serialization.json.jsonObject
import kotlinx.serialization.json.jsonPrimitive
import mu.KotlinLogging
import kotlin.concurrent.Volatile
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty
Expand Down Expand Up @@ -76,9 +75,9 @@ internal class NodeImpl(
internal suspend fun check() {
val version = getVersion()
val (_, _, _, _, _, _, _, plugins) = getInfo()
if(!version.startsWith("4")) {
if (!version.startsWith("4")) {
val message = "Unsupported Lavalink version (${version} on node $name"
if ("SNAPSHOT" in message){
if ("SNAPSHOT" in message) {
LOG.warn { message }
} else {
error(message)
Expand Down Expand Up @@ -182,7 +181,7 @@ internal class NodeImpl(
val event = try {
lavakord.json.decodeFromJsonElement<Message>(eventRaw)
} catch (e: SerializationException) {
LOG.warn(e) {"Could not parse event"}
LOG.warn(e) { "Could not parse event" }
}
when (event) {
is Message.PlayerUpdateEvent -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dev.schlaubi.lavakord.audio.retry
import kotlinx.atomicfu.atomic
import kotlinx.atomicfu.update
import kotlinx.coroutines.delay
import mu.KotlinLogging
import io.github.oshai.kotlinlogging.KotlinLogging
import kotlin.time.Duration

private val LOG = KotlinLogging.logger { }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.schlaubi.lavakord.internal

import io.ktor.client.engine.*
import io.ktor.client.engine.cio.*
import io.ktor.client.engine.okhttp.*

public actual object HttpEngine : HttpClientEngineFactory<HttpClientEngineConfig> by CIO
public actual object HttpEngine : HttpClientEngineFactory<HttpClientEngineConfig> by OkHttp
1 change: 1 addition & 0 deletions example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ kotlin {
}
js(IR) {
nodejs()
useCommonJs()
}

sourceSets {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package dev.schlaubi.lavakord.interop

import dev.schlaubi.lavakord.audio.EventSource
import kotlinx.coroutines.jdk9.asPublisher
import mu.KotlinLogging
import io.github.oshai.kotlinlogging.KotlinLogging
import java.util.concurrent.Flow
import java.util.concurrent.Flow.Subscriber
import java.util.function.Consumer
Expand Down
2 changes: 1 addition & 1 deletion jda/src/main/kotlin/dev/schlaubi/lavakord/jda/Builder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import dev.schlaubi.lavakord.MutableLavaKordOptions
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.future.await
import mu.KotlinLogging
import io.github.oshai.kotlinlogging.KotlinLogging
import net.dv8tion.jda.api.JDA
import net.dv8tion.jda.api.JDABuilder
import net.dv8tion.jda.api.hooks.EventListener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,28 @@ public sealed class SearchType(
`value`: String,
) : SearchType(value)

/**
* Tracks.
*/
public object Track : SearchType("track")

/**
* Album.
*/
public object Album : SearchType("album")

/**
* Artists.
*/
public object Artist : SearchType("artist")

/**
* Playlists.
*/
public object Playlist : SearchType("playlist")

/**
* Search suggestions
* Search suggestions.
*/
public object Text : SearchType("text")

Expand Down
32 changes: 16 additions & 16 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencyResolutionManagement {
kotlinx()
ktor()
ksp()
library("kord-core", "dev.kord", "kord-core").version("0.12.0")
library("kord-core", "dev.kord", "kord-core").version("0.13.1")
library(
"kord-ksp-annotations",
"dev.kord",
Expand All @@ -51,13 +51,13 @@ dependencyResolutionManagement {
"kord-ksp-processors"
).version("feature-publish-processor-SNAPSHOT")
library("junit-jupiter-engine", "org.junit.jupiter", "junit-jupiter-engine").version("5.10.1")
library("kotlinlogging", "io.github.microutils", "kotlin-logging").version("3.0.5")
library("sl4fj-simple", "org.slf4j", "slf4j-simple").version("2.0.7")
library("kotlinlogging", "io.github.oshai", "kotlin-logging").version("6.0.9")
library("sl4fj-simple", "org.slf4j", "slf4j-simple").version("2.0.13")

library("kotlinx-nodejs", "org.jetbrains.kotlin-wrappers", "kotlin-node").version("18.16.12-pre.594")
library("kotlinx-nodejs", "org.jetbrains.kotlin-wrappers", "kotlin-node").version("20.11.30-pre.742")

library("lavalink-protocol", "dev.arbjerg.lavalink", "protocol").version("4.0.0")
library("lyrics-protocol", "dev.schlaubi.lyrics", "protocol").version("2.1.0")
library("lavalink-protocol", "dev.arbjerg.lavalink", "protocol").version("4.0.5")
library("lyrics-protocol", "dev.schlaubi.lyrics", "protocol").version("2.4.5")
library(
"lavasearch-protocol",
"com.github.topi314.lavasearch",
Expand All @@ -67,33 +67,33 @@ dependencyResolutionManagement {
"lavasrc-protocol",
"com.github.topi314.lavasrc",
"protocol"
).version("4.0.0")
).version("4.1.0")

library("kotlinpoet", "com.squareup", "kotlinpoet-ksp").version("1.15.2")
library("kotlinpoet", "com.squareup", "kotlinpoet-ksp").version("1.16.0")

library("codegen", "dev.kord.codegen", "kotlinpoet").versionRef(codegen)
library("codegen-ksp", "dev.kord.codegen", "ksp").versionRef(codegen)
library("codegen-ksp-annotations", "dev.kord.codegen", "ksp-annotations").versionRef(codegen)
library("codegen-ksp-processor", "dev.kord.codegen", "ksp-processor").versionRef(codegen)

plugin("kotlinx-atomicfu", "kotlinx-atomicfu").version("0.23.1")
plugin("git-publish", "org.ajoberstar.git-publish").version("4.2.1")
plugin("kotlinx-atomicfu", "kotlinx-atomicfu").version("0.24.0")
plugin("git-publish", "org.ajoberstar.git-publish").version("4.2.2")
}
}
}

fun VersionCatalogBuilder.kotlinx() {
val coroutines = version("coroutines", "1.7.3")
val coroutines = version("coroutines", "1.8.1")
library("kotlinx-coroutines-core", "org.jetbrains.kotlinx", "kotlinx-coroutines-core").versionRef(coroutines)
library("kotlinx-coroutines-jdk8", "org.jetbrains.kotlinx", "kotlinx-coroutines-jdk8").versionRef(coroutines)
library("kotlinx-coroutines-jdk9", "org.jetbrains.kotlinx", "kotlinx-coroutines-jdk9").versionRef(coroutines)
library("kotlinx-coroutines-test", "org.jetbrains.kotlinx", "kotlinx-coroutines-test").versionRef(coroutines)
library("kotlinx-serialization-json", "org.jetbrains.kotlinx", "kotlinx-serialization-json").version("1.5.0")
library("kotlinx-datetime", "org.jetbrains.kotlinx", "kotlinx-datetime").version("0.4.0")
library("kotlinx-serialization-json", "org.jetbrains.kotlinx", "kotlinx-serialization-json").version("1.6.3")
library("kotlinx-datetime", "org.jetbrains.kotlinx", "kotlinx-datetime").version("0.5.0")
}

fun VersionCatalogBuilder.ktor() {
val ktor = version("ktor", "2.3.6")
val ktor = version("ktor", "2.3.11")
library("ktor-io", "io.ktor", "ktor-io").versionRef(ktor)
library("ktor-utils", "io.ktor", "ktor-utils").versionRef(ktor)
library("ktor-client-websockets", "io.ktor", "ktor-client-websockets").versionRef(ktor)
Expand All @@ -102,13 +102,13 @@ fun VersionCatalogBuilder.ktor() {
library("ktor-serialization-kotlinx-json", "io.ktor", "ktor-serialization-kotlinx-json").versionRef(ktor)
library("ktor-client-content-negotiation", "io.ktor", "ktor-client-content-negotiation").versionRef(ktor)
library("ktor-client-logging", "io.ktor", "ktor-client-logging").versionRef(ktor)
library("ktor-client-cio", "io.ktor", "ktor-client-cio").versionRef(ktor)
library("ktor-client-okhttp", "io.ktor", "ktor-client-okhttp").versionRef(ktor)
library("ktor-client-js", "io.ktor", "ktor-client-js").versionRef(ktor)
library("ktor-client-mock", "io.ktor", "ktor-client-mock").versionRef(ktor)
}

fun VersionCatalogBuilder.ksp() {
val ksp = version("ksp", "1.9.21-1.0.15")
val ksp = version("ksp", "1.9.24-1.0.20")
library("ksp-api", "com.google.devtools.ksp", "symbol-processing-api").versionRef(ksp)
plugin("ksp", "com.google.devtools.ksp").versionRef(ksp)
}

0 comments on commit d29bb04

Please sign in to comment.