Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Oct 25, 2024
1 parent 5ceddbb commit 8164edf
Show file tree
Hide file tree
Showing 18 changed files with 73 additions and 62 deletions.
39 changes: 25 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import dev.kord.gradle.tools.KordExtension
import dev.kord.gradle.tools.KordGradlePlugin
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("org.jetbrains.dokka")
Expand All @@ -12,7 +11,7 @@ plugins {
}

group = "dev.schlaubi.lavakord"
version = "7.1.0"
version = "8.0.0"

allprojects {
repositories {
Expand All @@ -24,6 +23,18 @@ allprojects {
}
}

dependencies {
dokka(projects.core)
dokka(projects.java)
dokka(projects.jda)
dokka(projects.jdaJava)
dokka(projects.kord)
dokka(projects.plugins.lavasearch)
dokka(projects.plugins.lavasrc)
dokka(projects.plugins.lyrics)
dokka(projects.plugins.sponsorblock)
}

subprojects {
afterEvaluate {
apply<KordGradlePlugin>()
Expand All @@ -33,23 +44,23 @@ subprojects {
jvmTarget = JvmTarget.JVM_17
}
}
}
group = rootProject.group

tasks {
withType<DokkaTask>().configureEach {
dokkaSourceSets {
configureEach {
includeNonPublic = false

perPackageOption {
matchingRegex = ".*\\.internal.*" // will match all .internal packages and sub-packages
suppress = true
if (plugins.hasPlugin("org.jetbrains.dokka")) {
dokka {
dokkaSourceSets {
configureEach {
perPackageOption {
matchingRegex = ".*\\.internal.*" // will match all .internal packages and sub-packages
suppress = true
}
}
}
}
}
}

group = rootProject.group

}

// Use system Node.Js on NixOS
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ repositories {
}

dependencies {
val kotlinVersion = "2.0.20"
val kotlinVersion = "2.0.21"
implementation(kotlin("gradle-plugin", kotlinVersion))
implementation(kotlin("serialization", kotlinVersion))
implementation(kotlin("gradle-plugin-api", kotlinVersion))
implementation("com.vanniktech:gradle-maven-publish-plugin:0.29.0")
implementation("org.jetbrains.dokka", "dokka-gradle-plugin", "1.9.20")
implementation("com.vanniktech:gradle-maven-publish-plugin:0.30.0")
implementation("org.jetbrains.dokka", "dokka-gradle-plugin", "2.0.0-Beta")
implementation(gradleApi())
implementation(localGroovy())
}
2 changes: 1 addition & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,5 @@ dependencies {
}

mavenPublishing {
configure(KotlinMultiplatform(JavadocJar.Dokka("dokkaHtml")))
configure(KotlinMultiplatform(JavadocJar.Dokka("dokkaGeneratePublicationHtml")))
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ import io.ktor.http.*
import io.ktor.serialization.kotlinx.*
import io.ktor.serialization.kotlinx.json.*
import kotlinx.atomicfu.atomic
import kotlinx.coroutines.joinAll
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.SharedFlow
import kotlinx.coroutines.flow.asSharedFlow
import kotlinx.coroutines.joinAll
import kotlinx.coroutines.launch
import kotlinx.coroutines.newCoroutineContext
import kotlinx.serialization.modules.SerializersModule
import kotlinx.serialization.modules.contextual
import kotlinx.serialization.modules.plus
Expand Down Expand Up @@ -122,7 +121,7 @@ public abstract class AbstractLavakord internal constructor(
internal val gatewayClient = HttpClient(HttpEngine) {
install(WebSockets) {
contentConverter = KotlinxWebsocketSerializationConverter(json)
pingInterval = 30.seconds.inWholeMilliseconds
pingInterval = 30.seconds
}

expectSuccess = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ internal class NodeImpl(
connect(resume) {
addUrl()
timeout {
requestTimeoutMillis = HttpTimeout.INFINITE_TIMEOUT_MS
requestTimeoutMillis = HttpTimeoutConfig.INFINITE_TIMEOUT_MS
}
header("Authorization", authenticationHeader)
header("User-Id", lavakord.userId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@ private suspend fun ByteReadChannel.readUTF(): String {
val length = readShort().toInt()
return readPacket(length).readText()
}

private suspend fun ByteReadChannel.readBoolean(): Boolean = readByte() != 0.toByte()
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package dev.schlaubi.lavakord.internal

import io.ktor.client.engine.HttpClientEngineConfig
import io.ktor.client.engine.HttpClientEngineFactory
import io.ktor.client.engine.js.*

/**
* Js implementation of [HttpEngine].
*/
public actual typealias HttpEngine = Js
public actual object HttpEngine : HttpClientEngineFactory<HttpClientEngineConfig> by Js
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ nextPlannedVersion=6.4.0
kotlinx.atomicfu.enableJvmIrTransformation=true
kotlinx.atomicfu.enableJsIrTransformation=true
kotlin.suppressGradlePluginWarnings=IncorrectCompileOnlyDependencyWarning
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
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.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ dependencies {


mavenPublishing {
configure(KotlinJvm(JavadocJar.Dokka("dokkaHtml")))
configure(KotlinJvm(JavadocJar.Dokka("dokkaGeneratePublicationHtml")))
}
2 changes: 1 addition & 1 deletion jda-java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ dependencies {
}

mavenPublishing {
configure(KotlinJvm(JavadocJar.Dokka("dokkaHtml")))
configure(KotlinJvm(JavadocJar.Dokka("dokkaGeneratePublicationHtml")))
}
2 changes: 1 addition & 1 deletion jda/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ dependencies {
}

mavenPublishing {
configure(KotlinJvm(JavadocJar.Dokka("dokkaHtml")))
configure(KotlinJvm(JavadocJar.Dokka("dokkaGeneratePublicationHtml")))
}
2 changes: 1 addition & 1 deletion kord/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ kotlin {
}

mavenPublishing {
configure(KotlinMultiplatform(JavadocJar.Dokka("dokkaHtml")))
configure(KotlinMultiplatform(JavadocJar.Dokka("dokkaGeneratePublicationHtml")))
}
33 changes: 15 additions & 18 deletions plugins/lavasearch/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.KotlinMultiplatform
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
`lavalink-module`
Expand Down Expand Up @@ -31,24 +29,23 @@ kotlin {
}

dependencies {
// kspCommonMainMetadata(libs.kord.ksp.processors)
kspCommonMainMetadata(libs.kord.ksp.processors)
}

//tasks {
// listOf(
// "sourcesJar",
// "jsSourcesJar",
// "jvmSourcesJar",
// "compileKotlinJs",
// "compileKotlinJvm",
// "dokkaHtml"
// ).forEach {
// named(it) {
// dependsOn("kspCommonMainKotlinMetadata")
// }
// }
//}
tasks {
listOf(
"sourcesJar",
"jsSourcesJar",
"jvmSourcesJar",
"compileKotlinJs",
"compileKotlinJvm",
).forEach {
named(it) {
dependsOn("kspCommonMainKotlinMetadata")
}
}
}

mavenPublishing {
configure(KotlinMultiplatform(JavadocJar.Dokka("dokkaHtml")))
configure(KotlinMultiplatform(JavadocJar.Dokka("dokkaGeneratePublicationHtml")))
}
2 changes: 1 addition & 1 deletion plugins/lavasrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ dependencies {
//}

mavenPublishing {
configure(KotlinMultiplatform(JavadocJar.Dokka("dokkaHtml")))
configure(KotlinMultiplatform(JavadocJar.Dokka("dokkaGeneratePublicationHtml")))
}
4 changes: 1 addition & 3 deletions plugins/lyrics/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.KotlinMultiplatform
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
`lavalink-module`
Expand All @@ -27,5 +25,5 @@ kotlin {
}

mavenPublishing {
configure(KotlinMultiplatform(JavadocJar.Dokka("dokkaHtml")))
configure(KotlinMultiplatform(JavadocJar.Dokka("dokkaGeneratePublicationHtml")))
}
4 changes: 2 additions & 2 deletions plugins/sponsorblock/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ dependencies {
}

tasks {
listOf("sourcesJar", "jsSourcesJar", "jvmSourcesJar", "compileKotlinJs", "compileKotlinJvm", "dokkaHtml").forEach {
listOf("sourcesJar", "jsSourcesJar", "jvmSourcesJar", "compileKotlinJs", "compileKotlinJvm", "dokkaGeneratePublicationHtml").forEach {
named(it) {
dependsOn("kspCommonMainKotlinMetadata")
}
}
}

mavenPublishing {
configure(KotlinMultiplatform(JavadocJar.Dokka("dokkaHtml")))
configure(KotlinMultiplatform(JavadocJar.Dokka("dokkaGeneratePublicationHtml")))
}
20 changes: 10 additions & 10 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencyResolutionManagement {
kotlinx()
ktor()
ksp()
library("kord-core", "dev.kord", "kord-core").version("0.14.0")
library("kord-core", "dev.kord", "kord-core").version("0.15.0")
library(
"kord-ksp-annotations",
"dev.kord",
Expand All @@ -45,13 +45,13 @@ dependencyResolutionManagement {
"dev.kord",
"kord-ksp-processors"
).version("feature-publish-processor-SNAPSHOT")
library("junit-jupiter-engine", "org.junit.jupiter", "junit-jupiter-engine").version("5.11.0")
library("junit-jupiter-engine", "org.junit.jupiter", "junit-jupiter-engine").version("5.11.3")
library("kotlinlogging", "io.github.oshai", "kotlin-logging").version("7.0.0")
library("sl4fj-simple", "org.slf4j", "slf4j-simple").version("2.0.16")

library("kotlinx-nodejs", "org.jetbrains.kotlin-wrappers", "kotlin-node").version("20.14.10-pre.800")
library("kotlinx-nodejs", "org.jetbrains.kotlin-wrappers", "kotlin-node").version("22.5.4-pre.820")

library("lavalink-protocol", "dev.arbjerg.lavalink", "protocol").version("4.0.7")
library("lavalink-protocol", "dev.arbjerg.lavalink", "protocol").version("4.0.8")
library("lyrics-protocol", "dev.schlaubi.lyrics", "protocol").version("2.5.0")
library(
"lavasearch-protocol",
Expand All @@ -62,7 +62,7 @@ dependencyResolutionManagement {
"lavasrc-protocol",
"com.github.topi314.lavasrc",
"protocol"
).version("4.2.0")
).version("4.3.0")

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

Expand All @@ -80,13 +80,13 @@ fun VersionCatalogBuilder.kotlinx() {
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.7.2")
library("kotlinx-serialization-json", "org.jetbrains.kotlinx", "kotlinx-serialization-json").version("1.7.3")
library("kotlinx-datetime", "org.jetbrains.kotlinx", "kotlinx-datetime").version("0.6.1")
plugin("kotlinx-atomicfu", "org.jetbrains.kotlinx.atomicfu").version("0.25.0")
plugin("kotlinx-atomicfu", "org.jetbrains.kotlinx.atomicfu").version("0.26.0")
}

fun VersionCatalogBuilder.ktor() {
val ktor = version("ktor", "2.3.12")
val ktor = version("ktor", "3.0.0")
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 @@ -101,8 +101,8 @@ fun VersionCatalogBuilder.ktor() {
}

fun VersionCatalogBuilder.ksp() {
val ksp = version("ksp", "2.0.20-1.0.24")
val ksp = version("ksp", "2.0.21-1.0.26")
library("ksp-api", "com.google.devtools.ksp", "symbol-processing-api").versionRef(ksp)
plugin("ksp", "com.google.devtools.ksp").versionRef(ksp)
plugin("gradle-tools", "dev.kord.gradle-tools").version("1.6.3")
plugin("gradle-tools", "dev.kord.gradle-tools").version("1.7.1")
}

0 comments on commit 8164edf

Please sign in to comment.