diff --git a/.github/workflows/deployment-ci.yml b/.github/workflows/deployment-ci.yml index 12e5d765085..904edc4dacf 100644 --- a/.github/workflows/deployment-ci.yml +++ b/.github/workflows/deployment-ci.yml @@ -27,9 +27,9 @@ jobs: uses: actions/setup-java@v4 with: distribution: temurin - java-version: 11 + java-version: 21 - name: Set up Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 - name: Build with Gradle run: ./gradlew --stacktrace --info build release: @@ -54,9 +54,9 @@ jobs: uses: actions/setup-java@v4 with: distribution: temurin - java-version: 11 + java-version: 21 - name: Set up Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 - name: Build with Gradle run: ./gradlew --stacktrace --info build - name: Publish with Gradle diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml index 473ab855651..7db9fe35624 100644 --- a/.github/workflows/docs-ci.yml +++ b/.github/workflows/docs-ci.yml @@ -23,9 +23,9 @@ jobs: uses: actions/setup-java@v4 with: distribution: temurin - java-version: 11 + java-version: 21 - name: Set up Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 - name: Build docs with Gradle run: ./gradlew --stacktrace --info dokkaHtmlMultiModule - name: Deploy docs to GitHub Pages diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml deleted file mode 100644 index 816ec52fbbc..00000000000 --- a/.github/workflows/gradle-wrapper-validation.yml +++ /dev/null @@ -1,14 +0,0 @@ -# This workflow will validate the checksums of Gradle Wrapper JAR files - -name: Gradle Wrapper Validation - -on: [ push, pull_request ] - -jobs: - validation: - name: Validate Gradle Wrapper - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Validate Gradle Wrapper - uses: gradle/actions/wrapper-validation@v3 diff --git a/buildSrc/src/main/kotlin/Compiler.kt b/buildSrc/src/main/kotlin/Compiler.kt index 00b3f31b5b6..6caa6484fc3 100644 --- a/buildSrc/src/main/kotlin/Compiler.kt +++ b/buildSrc/src/main/kotlin/Compiler.kt @@ -1,6 +1,8 @@ import org.gradle.api.NamedDomainObjectSet import org.gradle.kotlin.dsl.assign +import org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8 import org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions +import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet val kordOptIns = listOf( @@ -12,16 +14,20 @@ val kordOptIns = listOf( "dev.kord.common.annotation.KordVoice", ) -object Jvm { - const val target = 8 -} - -fun KotlinCommonCompilerOptions.applyKordCompilerOptions() { +internal fun KotlinCommonCompilerOptions.applyKordCommonCompilerOptions() { allWarningsAsErrors = true progressiveMode = true freeCompilerArgs.add("-Xexpect-actual-classes") } +internal const val KORD_JVM_TARGET = 8 + +internal fun KotlinJvmCompilerOptions.applyKordJvmCompilerOptions() { + applyKordCommonCompilerOptions() + jvmTarget = JVM_1_8 + freeCompilerArgs.add("-Xjdk-release=1.8") +} + internal fun NamedDomainObjectSet.applyKordTestOptIns() { named { it.contains("test", ignoreCase = true) }.configureEach { // allow `ExperimentalCoroutinesApi` for `TestScope.currentTime` diff --git a/buildSrc/src/main/kotlin/Documentation.kt b/buildSrc/src/main/kotlin/Documentation.kt index 92eb73e751c..a896e54f552 100644 --- a/buildSrc/src/main/kotlin/Documentation.kt +++ b/buildSrc/src/main/kotlin/Documentation.kt @@ -10,7 +10,7 @@ fun AbstractDokkaLeafTask.applyKordDokkaOptions() { dokkaSourceSets.configureEach { - jdkVersion = Jvm.target + jdkVersion = 22 suppressGeneratedFiles = false diff --git a/buildSrc/src/main/kotlin/kord-internal-module.gradle.kts b/buildSrc/src/main/kotlin/kord-internal-module.gradle.kts index 102f730ea2e..ad9b04bb4d1 100644 --- a/buildSrc/src/main/kotlin/kord-internal-module.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-internal-module.gradle.kts @@ -7,8 +7,13 @@ repositories { } kotlin { - jvmToolchain(Jvm.target) compilerOptions { - applyKordCompilerOptions() + applyKordJvmCompilerOptions() + } +} + +tasks { + withType().configureEach { + options.release = KORD_JVM_TARGET } } diff --git a/buildSrc/src/main/kotlin/kord-internal-multiplatform-module.gradle.kts b/buildSrc/src/main/kotlin/kord-internal-multiplatform-module.gradle.kts index 236b1027f1c..076b387f80e 100644 --- a/buildSrc/src/main/kotlin/kord-internal-multiplatform-module.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-internal-multiplatform-module.gradle.kts @@ -8,18 +8,21 @@ repositories { mavenCentral() } +@OptIn(ExperimentalKotlinGradlePluginApi::class) kotlin { - jvm() + compilerOptions { + applyKordCommonCompilerOptions() + } + + jvm { + compilerOptions { + applyKordJvmCompilerOptions() + } + } js { nodejs() useCommonJs() } - jvmToolchain(Jvm.target) - - @OptIn(ExperimentalKotlinGradlePluginApi::class) - compilerOptions { - applyKordCompilerOptions() - } } tasks { diff --git a/buildSrc/src/main/kotlin/kord-module.gradle.kts b/buildSrc/src/main/kotlin/kord-module.gradle.kts index f46703c0f73..19322086bd4 100644 --- a/buildSrc/src/main/kotlin/kord-module.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-module.gradle.kts @@ -24,11 +24,8 @@ apiValidation { kotlin { explicitApi() - - jvmToolchain(Jvm.target) - compilerOptions { - applyKordCompilerOptions() + applyKordJvmCompilerOptions() optIn.addAll(kordOptIns) } @@ -45,6 +42,10 @@ tasks { withType().configureEach { applyKordDokkaOptions() } + + withType().configureEach { + options.release = KORD_JVM_TARGET + } } publishing { diff --git a/buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts b/buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts index 77ec746acbd..5a28f04dd8c 100644 --- a/buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts @@ -23,10 +23,19 @@ apiValidation { applyKordBCVOptions() } +@OptIn(ExperimentalKotlinGradlePluginApi::class) kotlin { explicitApi() + compilerOptions { + applyKordCommonCompilerOptions() + optIn.addAll(kordOptIns) + } - jvm() + jvm { + compilerOptions { + applyKordJvmCompilerOptions() + } + } js { nodejs { testTask { @@ -39,13 +48,6 @@ kotlin { } useCommonJs() } - jvmToolchain(Jvm.target) - - @OptIn(ExperimentalKotlinGradlePluginApi::class) - compilerOptions { - applyKordCompilerOptions() - optIn.addAll(kordOptIns) - } applyDefaultHierarchyTemplate() diff --git a/common/api/common.klib.api b/common/api/common.klib.api index 26434c40600..9d14db9d84a 100644 --- a/common/api/common.klib.api +++ b/common/api/common.klib.api @@ -6341,8 +6341,6 @@ final class dev.kord.common/Locale { // dev.kord.common/Locale|null[0] } sealed class <#A: kotlin/Any?> dev.kord.common.entity/AuditLogChangeKey { // dev.kord.common.entity/AuditLogChangeKey|null[0] - constructor (kotlin/String, kotlinx.serialization/KSerializer<#A>) // dev.kord.common.entity/AuditLogChangeKey.|(kotlin.String;kotlinx.serialization.KSerializer<1:0>){}[0] - final val name // dev.kord.common.entity/AuditLogChangeKey.name|{}name[0] final fun (): kotlin/String // dev.kord.common.entity/AuditLogChangeKey.name.|(){}[0] final val serializer // dev.kord.common.entity/AuditLogChangeKey.serializer|{}serializer[0] @@ -6479,8 +6477,6 @@ sealed class <#A: kotlin/Any?> dev.kord.common.entity/AuditLogChangeKey { // dev } sealed class <#A: out kotlin/Any?> dev.kord.common.entity.optional/Optional { // dev.kord.common.entity.optional/Optional|null[0] - constructor () // dev.kord.common.entity.optional/Optional.|(){}[0] - open val value // dev.kord.common.entity.optional/Optional.value|{}value[0] open fun (): #A? // dev.kord.common.entity.optional/Optional.value.|(){}[0] @@ -6533,8 +6529,6 @@ sealed class <#A: out kotlin/Any?> dev.kord.common.entity.optional/Optional { // } sealed class <#A: out kotlin/Any?> dev.kord.common.entity/CommandArgument : dev.kord.common.entity/Option { // dev.kord.common.entity/CommandArgument|null[0] - constructor () // dev.kord.common.entity/CommandArgument.|(){}[0] - abstract val focused // dev.kord.common.entity/CommandArgument.focused|{}focused[0] abstract fun (): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.common.entity/CommandArgument.focused.|(){}[0] abstract val value // dev.kord.common.entity/CommandArgument.value|{}value[0] @@ -6758,8 +6752,6 @@ sealed class <#A: out kotlin/Any?> dev.kord.common.entity/CommandArgument : dev. } sealed class dev.kord.common.entity.optional/OptionalBoolean { // dev.kord.common.entity.optional/OptionalBoolean|null[0] - constructor () // dev.kord.common.entity.optional/OptionalBoolean.|(){}[0] - final val asNullable // dev.kord.common.entity.optional/OptionalBoolean.asNullable|{}asNullable[0] final fun (): kotlin/Boolean? // dev.kord.common.entity.optional/OptionalBoolean.asNullable.|(){}[0] final val asOptional // dev.kord.common.entity.optional/OptionalBoolean.asOptional|{}asOptional[0] @@ -6792,8 +6784,6 @@ sealed class dev.kord.common.entity.optional/OptionalBoolean { // dev.kord.commo } sealed class dev.kord.common.entity.optional/OptionalInt { // dev.kord.common.entity.optional/OptionalInt|null[0] - constructor () // dev.kord.common.entity.optional/OptionalInt.|(){}[0] - final val asNullable // dev.kord.common.entity.optional/OptionalInt.asNullable|{}asNullable[0] final fun (): kotlin/Int? // dev.kord.common.entity.optional/OptionalInt.asNullable.|(){}[0] final val asOptional // dev.kord.common.entity.optional/OptionalInt.asOptional|{}asOptional[0] @@ -6823,8 +6813,6 @@ sealed class dev.kord.common.entity.optional/OptionalInt { // dev.kord.common.en } sealed class dev.kord.common.entity.optional/OptionalLong { // dev.kord.common.entity.optional/OptionalLong|null[0] - constructor () // dev.kord.common.entity.optional/OptionalLong.|(){}[0] - final val asNullable // dev.kord.common.entity.optional/OptionalLong.asNullable|{}asNullable[0] final fun (): kotlin/Long? // dev.kord.common.entity.optional/OptionalLong.asNullable.|(){}[0] final val asOptional // dev.kord.common.entity.optional/OptionalLong.asOptional|{}asOptional[0] @@ -6854,8 +6842,6 @@ sealed class dev.kord.common.entity.optional/OptionalLong { // dev.kord.common.e } sealed class dev.kord.common.entity.optional/OptionalSnowflake { // dev.kord.common.entity.optional/OptionalSnowflake|null[0] - constructor () // dev.kord.common.entity.optional/OptionalSnowflake.|(){}[0] - final val asOptional // dev.kord.common.entity.optional/OptionalSnowflake.asOptional|{}asOptional[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.common.entity.optional/OptionalSnowflake.asOptional.|(){}[0] open val value // dev.kord.common.entity.optional/OptionalSnowflake.value|{}value[0] @@ -6886,8 +6872,6 @@ sealed class dev.kord.common.entity.optional/OptionalSnowflake { // dev.kord.com } sealed class dev.kord.common.entity/ActivityFlag { // dev.kord.common.entity/ActivityFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ActivityFlag.|(kotlin.Int){}[0] - final val shift // dev.kord.common.entity/ActivityFlag.shift|{}shift[0] final fun (): kotlin/Int // dev.kord.common.entity/ActivityFlag.shift.|(){}[0] final val value // dev.kord.common.entity/ActivityFlag.value|{}value[0] @@ -6928,8 +6912,6 @@ sealed class dev.kord.common.entity/ActivityFlag { // dev.kord.common.entity/Act } sealed class dev.kord.common.entity/ActivityType { // dev.kord.common.entity/ActivityType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ActivityType.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/ActivityType.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/ActivityType.code.|(){}[0] @@ -6961,8 +6943,6 @@ sealed class dev.kord.common.entity/ActivityType { // dev.kord.common.entity/Act } sealed class dev.kord.common.entity/AllowedMentionType { // dev.kord.common.entity/AllowedMentionType|null[0] - constructor (kotlin/String) // dev.kord.common.entity/AllowedMentionType.|(kotlin.String){}[0] - final val value // dev.kord.common.entity/AllowedMentionType.value|{}value[0] final fun (): kotlin/String // dev.kord.common.entity/AllowedMentionType.value.|(){}[0] @@ -6988,8 +6968,6 @@ sealed class dev.kord.common.entity/AllowedMentionType { // dev.kord.common.enti } sealed class dev.kord.common.entity/ApplicationCommandOptionType { // dev.kord.common.entity/ApplicationCommandOptionType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ApplicationCommandOptionType.|(kotlin.Int){}[0] - final val type // dev.kord.common.entity/ApplicationCommandOptionType.type|{}type[0] final fun (): kotlin/Int // dev.kord.common.entity/ApplicationCommandOptionType.type.|(){}[0] @@ -7031,8 +7009,6 @@ sealed class dev.kord.common.entity/ApplicationCommandOptionType { // dev.kord.c } sealed class dev.kord.common.entity/ApplicationCommandPermissionType { // dev.kord.common.entity/ApplicationCommandPermissionType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ApplicationCommandPermissionType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ApplicationCommandPermissionType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ApplicationCommandPermissionType.value.|(){}[0] @@ -7058,8 +7034,6 @@ sealed class dev.kord.common.entity/ApplicationCommandPermissionType { // dev.ko } sealed class dev.kord.common.entity/ApplicationCommandType { // dev.kord.common.entity/ApplicationCommandType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ApplicationCommandType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ApplicationCommandType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ApplicationCommandType.value.|(){}[0] @@ -7085,8 +7059,6 @@ sealed class dev.kord.common.entity/ApplicationCommandType { // dev.kord.common. } sealed class dev.kord.common.entity/ApplicationFlag { // dev.kord.common.entity/ApplicationFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ApplicationFlag.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/ApplicationFlag.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/ApplicationFlag.code.|(){}[0] final val shift // dev.kord.common.entity/ApplicationFlag.shift|{}shift[0] @@ -7129,8 +7101,6 @@ sealed class dev.kord.common.entity/ApplicationFlag { // dev.kord.common.entity/ } sealed class dev.kord.common.entity/ApplicationRoleConnectionMetadataType { // dev.kord.common.entity/ApplicationRoleConnectionMetadataType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ApplicationRoleConnectionMetadataType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ApplicationRoleConnectionMetadataType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ApplicationRoleConnectionMetadataType.value.|(){}[0] @@ -7166,8 +7136,6 @@ sealed class dev.kord.common.entity/ApplicationRoleConnectionMetadataType { // d } sealed class dev.kord.common.entity/ArchiveDuration { // dev.kord.common.entity/ArchiveDuration|null[0] - constructor (kotlin.time/Duration) // dev.kord.common.entity/ArchiveDuration.|(kotlin.time.Duration){}[0] - final val duration // dev.kord.common.entity/ArchiveDuration.duration|{}duration[0] final fun (): kotlin.time/Duration // dev.kord.common.entity/ArchiveDuration.duration.|(){}[0] @@ -7197,8 +7165,6 @@ sealed class dev.kord.common.entity/ArchiveDuration { // dev.kord.common.entity/ } sealed class dev.kord.common.entity/AttachmentFlag { // dev.kord.common.entity/AttachmentFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/AttachmentFlag.|(kotlin.Int){}[0] - final val shift // dev.kord.common.entity/AttachmentFlag.shift|{}shift[0] final fun (): kotlin/Int // dev.kord.common.entity/AttachmentFlag.shift.|(){}[0] final val value // dev.kord.common.entity/AttachmentFlag.value|{}value[0] @@ -7223,8 +7189,6 @@ sealed class dev.kord.common.entity/AttachmentFlag { // dev.kord.common.entity/A } sealed class dev.kord.common.entity/AuditLogEvent { // dev.kord.common.entity/AuditLogEvent|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/AuditLogEvent.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/AuditLogEvent.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/AuditLogEvent.value.|(){}[0] @@ -7356,8 +7320,6 @@ sealed class dev.kord.common.entity/AuditLogEvent { // dev.kord.common.entity/Au } sealed class dev.kord.common.entity/AutoModerationActionType { // dev.kord.common.entity/AutoModerationActionType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/AutoModerationActionType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/AutoModerationActionType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/AutoModerationActionType.value.|(){}[0] @@ -7385,8 +7347,6 @@ sealed class dev.kord.common.entity/AutoModerationActionType { // dev.kord.commo } sealed class dev.kord.common.entity/AutoModerationRuleEventType { // dev.kord.common.entity/AutoModerationRuleEventType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/AutoModerationRuleEventType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/AutoModerationRuleEventType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/AutoModerationRuleEventType.value.|(){}[0] @@ -7410,8 +7370,6 @@ sealed class dev.kord.common.entity/AutoModerationRuleEventType { // dev.kord.co } sealed class dev.kord.common.entity/AutoModerationRuleKeywordPresetType { // dev.kord.common.entity/AutoModerationRuleKeywordPresetType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/AutoModerationRuleKeywordPresetType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/AutoModerationRuleKeywordPresetType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/AutoModerationRuleKeywordPresetType.value.|(){}[0] @@ -7437,8 +7395,6 @@ sealed class dev.kord.common.entity/AutoModerationRuleKeywordPresetType { // dev } sealed class dev.kord.common.entity/AutoModerationRuleTriggerType { // dev.kord.common.entity/AutoModerationRuleTriggerType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/AutoModerationRuleTriggerType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/AutoModerationRuleTriggerType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/AutoModerationRuleTriggerType.value.|(){}[0] @@ -7468,8 +7424,6 @@ sealed class dev.kord.common.entity/AutoModerationRuleTriggerType { // dev.kord. } sealed class dev.kord.common.entity/ButtonStyle { // dev.kord.common.entity/ButtonStyle|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ButtonStyle.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ButtonStyle.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ButtonStyle.value.|(){}[0] @@ -7499,8 +7453,6 @@ sealed class dev.kord.common.entity/ButtonStyle { // dev.kord.common.entity/Butt } sealed class dev.kord.common.entity/ChannelFlag { // dev.kord.common.entity/ChannelFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ChannelFlag.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/ChannelFlag.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/ChannelFlag.code.|(){}[0] final val shift // dev.kord.common.entity/ChannelFlag.shift|{}shift[0] @@ -7529,8 +7481,6 @@ sealed class dev.kord.common.entity/ChannelFlag { // dev.kord.common.entity/Chan } sealed class dev.kord.common.entity/ChannelType { // dev.kord.common.entity/ChannelType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ChannelType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ChannelType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ChannelType.value.|(){}[0] @@ -7576,8 +7526,6 @@ sealed class dev.kord.common.entity/ChannelType { // dev.kord.common.entity/Chan } sealed class dev.kord.common.entity/Choice { // dev.kord.common.entity/Choice|null[0] - constructor () // dev.kord.common.entity/Choice.|(){}[0] - abstract val name // dev.kord.common.entity/Choice.name|{}name[0] abstract fun (): kotlin/String // dev.kord.common.entity/Choice.name.|(){}[0] abstract val nameLocalizations // dev.kord.common.entity/Choice.nameLocalizations|{}nameLocalizations[0] @@ -7648,8 +7596,6 @@ sealed class dev.kord.common.entity/Choice { // dev.kord.common.entity/Choice|nu } sealed class dev.kord.common.entity/ComponentType { // dev.kord.common.entity/ComponentType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ComponentType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ComponentType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ComponentType.value.|(){}[0] @@ -7685,8 +7631,6 @@ sealed class dev.kord.common.entity/ComponentType { // dev.kord.common.entity/Co } sealed class dev.kord.common.entity/DefaultMessageNotificationLevel { // dev.kord.common.entity/DefaultMessageNotificationLevel|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/DefaultMessageNotificationLevel.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/DefaultMessageNotificationLevel.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/DefaultMessageNotificationLevel.value.|(){}[0] @@ -7710,8 +7654,6 @@ sealed class dev.kord.common.entity/DefaultMessageNotificationLevel { // dev.kor } sealed class dev.kord.common.entity/DiscordComponent { // dev.kord.common.entity/DiscordComponent|null[0] - constructor () // dev.kord.common.entity/DiscordComponent.|(){}[0] - abstract val channelTypes // dev.kord.common.entity/DiscordComponent.channelTypes|{}channelTypes[0] abstract fun (): dev.kord.common.entity.optional/Optional> // dev.kord.common.entity/DiscordComponent.channelTypes.|(){}[0] abstract val components // dev.kord.common.entity/DiscordComponent.components|{}components[0] @@ -7753,8 +7695,6 @@ sealed class dev.kord.common.entity/DiscordComponent { // dev.kord.common.entity } sealed class dev.kord.common.entity/DiscordConnectionVisibility { // dev.kord.common.entity/DiscordConnectionVisibility|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/DiscordConnectionVisibility.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/DiscordConnectionVisibility.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/DiscordConnectionVisibility.value.|(){}[0] @@ -7778,8 +7718,6 @@ sealed class dev.kord.common.entity/DiscordConnectionVisibility { // dev.kord.co } sealed class dev.kord.common.entity/EmbedType { // dev.kord.common.entity/EmbedType|null[0] - constructor (kotlin/String) // dev.kord.common.entity/EmbedType.|(kotlin.String){}[0] - final val value // dev.kord.common.entity/EmbedType.value|{}value[0] final fun (): kotlin/String // dev.kord.common.entity/EmbedType.value.|(){}[0] @@ -7811,8 +7749,6 @@ sealed class dev.kord.common.entity/EmbedType { // dev.kord.common.entity/EmbedT } sealed class dev.kord.common.entity/ExplicitContentFilter { // dev.kord.common.entity/ExplicitContentFilter|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ExplicitContentFilter.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ExplicitContentFilter.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ExplicitContentFilter.value.|(){}[0] @@ -7838,8 +7774,6 @@ sealed class dev.kord.common.entity/ExplicitContentFilter { // dev.kord.common.e } sealed class dev.kord.common.entity/ForumLayoutType { // dev.kord.common.entity/ForumLayoutType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ForumLayoutType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ForumLayoutType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ForumLayoutType.value.|(){}[0] @@ -7865,8 +7799,6 @@ sealed class dev.kord.common.entity/ForumLayoutType { // dev.kord.common.entity/ } sealed class dev.kord.common.entity/GuildFeature { // dev.kord.common.entity/GuildFeature|null[0] - constructor (kotlin/String) // dev.kord.common.entity/GuildFeature.|(kotlin.String){}[0] - final val value // dev.kord.common.entity/GuildFeature.value|{}value[0] final fun (): kotlin/String // dev.kord.common.entity/GuildFeature.value.|(){}[0] @@ -7940,8 +7872,6 @@ sealed class dev.kord.common.entity/GuildFeature { // dev.kord.common.entity/Gui } sealed class dev.kord.common.entity/GuildMemberFlag { // dev.kord.common.entity/GuildMemberFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/GuildMemberFlag.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/GuildMemberFlag.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/GuildMemberFlag.code.|(){}[0] final val shift // dev.kord.common.entity/GuildMemberFlag.shift|{}shift[0] @@ -7972,8 +7902,6 @@ sealed class dev.kord.common.entity/GuildMemberFlag { // dev.kord.common.entity/ } sealed class dev.kord.common.entity/GuildScheduledEventPrivacyLevel { // dev.kord.common.entity/GuildScheduledEventPrivacyLevel|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/GuildScheduledEventPrivacyLevel.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/GuildScheduledEventPrivacyLevel.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/GuildScheduledEventPrivacyLevel.value.|(){}[0] @@ -7995,8 +7923,6 @@ sealed class dev.kord.common.entity/GuildScheduledEventPrivacyLevel { // dev.kor } sealed class dev.kord.common.entity/GuildScheduledEventStatus { // dev.kord.common.entity/GuildScheduledEventStatus|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/GuildScheduledEventStatus.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/GuildScheduledEventStatus.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/GuildScheduledEventStatus.value.|(){}[0] @@ -8024,8 +7950,6 @@ sealed class dev.kord.common.entity/GuildScheduledEventStatus { // dev.kord.comm } sealed class dev.kord.common.entity/IntegrationExpireBehavior { // dev.kord.common.entity/IntegrationExpireBehavior|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/IntegrationExpireBehavior.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/IntegrationExpireBehavior.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/IntegrationExpireBehavior.value.|(){}[0] @@ -8049,8 +7973,6 @@ sealed class dev.kord.common.entity/IntegrationExpireBehavior { // dev.kord.comm } sealed class dev.kord.common.entity/InteractionResponseType { // dev.kord.common.entity/InteractionResponseType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/InteractionResponseType.|(kotlin.Int){}[0] - final val type // dev.kord.common.entity/InteractionResponseType.type|{}type[0] final fun (): kotlin/Int // dev.kord.common.entity/InteractionResponseType.type.|(){}[0] @@ -8084,8 +8006,6 @@ sealed class dev.kord.common.entity/InteractionResponseType { // dev.kord.common } sealed class dev.kord.common.entity/InteractionType { // dev.kord.common.entity/InteractionType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/InteractionType.|(kotlin.Int){}[0] - final val type // dev.kord.common.entity/InteractionType.type|{}type[0] final fun (): kotlin/Int // dev.kord.common.entity/InteractionType.type.|(){}[0] @@ -8115,8 +8035,6 @@ sealed class dev.kord.common.entity/InteractionType { // dev.kord.common.entity/ } sealed class dev.kord.common.entity/InviteTargetType { // dev.kord.common.entity/InviteTargetType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/InviteTargetType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/InviteTargetType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/InviteTargetType.value.|(){}[0] @@ -8140,8 +8058,6 @@ sealed class dev.kord.common.entity/InviteTargetType { // dev.kord.common.entity } sealed class dev.kord.common.entity/MFALevel { // dev.kord.common.entity/MFALevel|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/MFALevel.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/MFALevel.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/MFALevel.value.|(){}[0] @@ -8165,8 +8081,6 @@ sealed class dev.kord.common.entity/MFALevel { // dev.kord.common.entity/MFALeve } sealed class dev.kord.common.entity/MessageActivityType { // dev.kord.common.entity/MessageActivityType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/MessageActivityType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/MessageActivityType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/MessageActivityType.value.|(){}[0] @@ -8194,8 +8108,6 @@ sealed class dev.kord.common.entity/MessageActivityType { // dev.kord.common.ent } sealed class dev.kord.common.entity/MessageFlag { // dev.kord.common.entity/MessageFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/MessageFlag.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/MessageFlag.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/MessageFlag.code.|(){}[0] final val shift // dev.kord.common.entity/MessageFlag.shift|{}shift[0] @@ -8240,8 +8152,6 @@ sealed class dev.kord.common.entity/MessageFlag { // dev.kord.common.entity/Mess } sealed class dev.kord.common.entity/MessageStickerType { // dev.kord.common.entity/MessageStickerType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/MessageStickerType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/MessageStickerType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/MessageStickerType.value.|(){}[0] @@ -8269,8 +8179,6 @@ sealed class dev.kord.common.entity/MessageStickerType { // dev.kord.common.enti } sealed class dev.kord.common.entity/MessageType { // dev.kord.common.entity/MessageType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/MessageType.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/MessageType.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/MessageType.code.|(){}[0] @@ -8352,8 +8260,6 @@ sealed class dev.kord.common.entity/MessageType { // dev.kord.common.entity/Mess } sealed class dev.kord.common.entity/NsfwLevel { // dev.kord.common.entity/NsfwLevel|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/NsfwLevel.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/NsfwLevel.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/NsfwLevel.value.|(){}[0] @@ -8381,8 +8287,6 @@ sealed class dev.kord.common.entity/NsfwLevel { // dev.kord.common.entity/NsfwLe } sealed class dev.kord.common.entity/OnboardingMode { // dev.kord.common.entity/OnboardingMode|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/OnboardingMode.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/OnboardingMode.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/OnboardingMode.value.|(){}[0] @@ -8406,8 +8310,6 @@ sealed class dev.kord.common.entity/OnboardingMode { // dev.kord.common.entity/O } sealed class dev.kord.common.entity/OnboardingPromptType { // dev.kord.common.entity/OnboardingPromptType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/OnboardingPromptType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/OnboardingPromptType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/OnboardingPromptType.value.|(){}[0] @@ -8431,8 +8333,6 @@ sealed class dev.kord.common.entity/OnboardingPromptType { // dev.kord.common.en } sealed class dev.kord.common.entity/Option { // dev.kord.common.entity/Option|null[0] - constructor () // dev.kord.common.entity/Option.|(){}[0] - abstract val name // dev.kord.common.entity/Option.name|{}name[0] abstract fun (): kotlin/String // dev.kord.common.entity/Option.name.|(){}[0] abstract val type // dev.kord.common.entity/Option.type|{}type[0] @@ -8444,8 +8344,6 @@ sealed class dev.kord.common.entity/Option { // dev.kord.common.entity/Option|nu } sealed class dev.kord.common.entity/OverwriteType { // dev.kord.common.entity/OverwriteType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/OverwriteType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/OverwriteType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/OverwriteType.value.|(){}[0] @@ -8469,8 +8367,6 @@ sealed class dev.kord.common.entity/OverwriteType { // dev.kord.common.entity/Ov } sealed class dev.kord.common.entity/Permission { // dev.kord.common.entity/Permission|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/Permission.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/Permission.code|{}code[0] final fun (): dev.kord.common/DiscordBitSet // dev.kord.common.entity/Permission.code.|(){}[0] final val shift // dev.kord.common.entity/Permission.shift|{}shift[0] @@ -8587,8 +8483,6 @@ sealed class dev.kord.common.entity/Permission { // dev.kord.common.entity/Permi } sealed class dev.kord.common.entity/PremiumTier { // dev.kord.common.entity/PremiumTier|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/PremiumTier.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/PremiumTier.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/PremiumTier.value.|(){}[0] @@ -8616,8 +8510,6 @@ sealed class dev.kord.common.entity/PremiumTier { // dev.kord.common.entity/Prem } sealed class dev.kord.common.entity/PresenceStatus { // dev.kord.common.entity/PresenceStatus|null[0] - constructor (kotlin/String) // dev.kord.common.entity/PresenceStatus.|(kotlin.String){}[0] - final val value // dev.kord.common.entity/PresenceStatus.value|{}value[0] final fun (): kotlin/String // dev.kord.common.entity/PresenceStatus.value.|(){}[0] @@ -8647,8 +8539,6 @@ sealed class dev.kord.common.entity/PresenceStatus { // dev.kord.common.entity/P } sealed class dev.kord.common.entity/RoleFlag { // dev.kord.common.entity/RoleFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/RoleFlag.|(kotlin.Int){}[0] - final val shift // dev.kord.common.entity/RoleFlag.shift|{}shift[0] final fun (): kotlin/Int // dev.kord.common.entity/RoleFlag.shift.|(){}[0] final val value // dev.kord.common.entity/RoleFlag.value|{}value[0] @@ -8673,8 +8563,6 @@ sealed class dev.kord.common.entity/RoleFlag { // dev.kord.common.entity/RoleFla } sealed class dev.kord.common.entity/ScheduledEntityType { // dev.kord.common.entity/ScheduledEntityType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ScheduledEntityType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ScheduledEntityType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ScheduledEntityType.value.|(){}[0] @@ -8700,8 +8588,6 @@ sealed class dev.kord.common.entity/ScheduledEntityType { // dev.kord.common.ent } sealed class dev.kord.common.entity/SelectDefaultValueType { // dev.kord.common.entity/SelectDefaultValueType|null[0] - constructor (kotlin/String) // dev.kord.common.entity/SelectDefaultValueType.|(kotlin.String){}[0] - final val value // dev.kord.common.entity/SelectDefaultValueType.value|{}value[0] final fun (): kotlin/String // dev.kord.common.entity/SelectDefaultValueType.value.|(){}[0] @@ -8727,8 +8613,6 @@ sealed class dev.kord.common.entity/SelectDefaultValueType { // dev.kord.common. } sealed class dev.kord.common.entity/SortOrderType { // dev.kord.common.entity/SortOrderType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/SortOrderType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/SortOrderType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/SortOrderType.value.|(){}[0] @@ -8752,8 +8636,6 @@ sealed class dev.kord.common.entity/SortOrderType { // dev.kord.common.entity/So } sealed class dev.kord.common.entity/StageInstancePrivacyLevel { // dev.kord.common.entity/StageInstancePrivacyLevel|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/StageInstancePrivacyLevel.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/StageInstancePrivacyLevel.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/StageInstancePrivacyLevel.value.|(){}[0] @@ -8777,8 +8659,6 @@ sealed class dev.kord.common.entity/StageInstancePrivacyLevel { // dev.kord.comm } sealed class dev.kord.common.entity/SystemChannelFlag { // dev.kord.common.entity/SystemChannelFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/SystemChannelFlag.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/SystemChannelFlag.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/SystemChannelFlag.code.|(){}[0] final val shift // dev.kord.common.entity/SystemChannelFlag.shift|{}shift[0] @@ -8813,8 +8693,6 @@ sealed class dev.kord.common.entity/SystemChannelFlag { // dev.kord.common.entit } sealed class dev.kord.common.entity/TeamMemberRole { // dev.kord.common.entity/TeamMemberRole|null[0] - constructor (kotlin/String) // dev.kord.common.entity/TeamMemberRole.|(kotlin.String){}[0] - final val value // dev.kord.common.entity/TeamMemberRole.value|{}value[0] final fun (): kotlin/String // dev.kord.common.entity/TeamMemberRole.value.|(){}[0] @@ -8840,8 +8718,6 @@ sealed class dev.kord.common.entity/TeamMemberRole { // dev.kord.common.entity/T } sealed class dev.kord.common.entity/TeamMembershipState { // dev.kord.common.entity/TeamMembershipState|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/TeamMembershipState.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/TeamMembershipState.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/TeamMembershipState.value.|(){}[0] @@ -8865,8 +8741,6 @@ sealed class dev.kord.common.entity/TeamMembershipState { // dev.kord.common.ent } sealed class dev.kord.common.entity/TextInputStyle { // dev.kord.common.entity/TextInputStyle|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/TextInputStyle.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/TextInputStyle.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/TextInputStyle.value.|(){}[0] @@ -8890,8 +8764,6 @@ sealed class dev.kord.common.entity/TextInputStyle { // dev.kord.common.entity/T } sealed class dev.kord.common.entity/UserFlag { // dev.kord.common.entity/UserFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/UserFlag.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/UserFlag.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/UserFlag.code.|(){}[0] final val shift // dev.kord.common.entity/UserFlag.shift|{}shift[0] @@ -8944,8 +8816,6 @@ sealed class dev.kord.common.entity/UserFlag { // dev.kord.common.entity/UserFla } sealed class dev.kord.common.entity/UserPremium { // dev.kord.common.entity/UserPremium|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/UserPremium.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/UserPremium.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/UserPremium.value.|(){}[0] @@ -8973,8 +8843,6 @@ sealed class dev.kord.common.entity/UserPremium { // dev.kord.common.entity/User } sealed class dev.kord.common.entity/VerificationLevel { // dev.kord.common.entity/VerificationLevel|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/VerificationLevel.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/VerificationLevel.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/VerificationLevel.value.|(){}[0] @@ -9004,8 +8872,6 @@ sealed class dev.kord.common.entity/VerificationLevel { // dev.kord.common.entit } sealed class dev.kord.common.entity/VideoQualityMode { // dev.kord.common.entity/VideoQualityMode|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/VideoQualityMode.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/VideoQualityMode.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/VideoQualityMode.value.|(){}[0] @@ -9029,8 +8895,6 @@ sealed class dev.kord.common.entity/VideoQualityMode { // dev.kord.common.entity } sealed class dev.kord.common.entity/WebhookType { // dev.kord.common.entity/WebhookType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/WebhookType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/WebhookType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/WebhookType.value.|(){}[0] @@ -9056,8 +8920,6 @@ sealed class dev.kord.common.entity/WebhookType { // dev.kord.common.entity/Webh } sealed class dev.kord.common.serialization/DurationAsLongSerializer : kotlinx.serialization/KSerializer { // dev.kord.common.serialization/DurationAsLongSerializer|null[0] - constructor (kotlin.time/DurationUnit, kotlin/String) // dev.kord.common.serialization/DurationAsLongSerializer.|(kotlin.time.DurationUnit;kotlin.String){}[0] - final val descriptor // dev.kord.common.serialization/DurationAsLongSerializer.descriptor|{}descriptor[0] final fun (): kotlinx.serialization.descriptors/SerialDescriptor // dev.kord.common.serialization/DurationAsLongSerializer.descriptor.|(){}[0] final val unit // dev.kord.common.serialization/DurationAsLongSerializer.unit|{}unit[0] diff --git a/common/build.gradle.kts b/common/build.gradle.kts index f7a83f890df..0c6a177a319 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -32,8 +32,9 @@ kotlin { dependencies { api(libs.ktor.client.js) - // workaround for https://youtrack.jetbrains.com/issue/KT-43500 - // (intended to be compileOnly in commonMain only) + // workaround for https://youtrack.jetbrains.com/issue/KT-43500 / + // https://youtrack.jetbrains.com/issue/KT-64109#focus=Comments-27-10064206.0-0 / + // https://youtrack.jetbrains.com/issue/KT-61096 (intended to be compileOnly in commonMain only) implementation(projects.kspAnnotations) } } diff --git a/common/src/commonMain/kotlin/entity/Snowflake.kt b/common/src/commonMain/kotlin/entity/Snowflake.kt index 07a1f2a06ab..6a63097fcc4 100644 --- a/common/src/commonMain/kotlin/entity/Snowflake.kt +++ b/common/src/commonMain/kotlin/entity/Snowflake.kt @@ -138,7 +138,7 @@ public class Snowflake : Comparable { * * The comparison is based first on the value of the [timestamp], then on the value of the [workerId], then on the * value of the [processId] and finally on the value of the [increment]. It is *consistent with equals*, as defined - * by [Comparable](https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html). + * by [Comparable](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/lang/Comparable.html). */ override fun compareTo(other: Snowflake): Int { // the layout of Snowflake values from MSB to LSB is timestamp, workerId, processId, increment, @@ -175,12 +175,13 @@ public class Snowflake : Comparable { * [processId] and [increment] are not taken into account. * * Note: this comparator imposes an ordering that is *inconsistent with equals*, as defined by - * [Comparator](https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html). It therefore shouldn't be - * used to order a [SortedSet](https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html) or - * [SortedMap](https://docs.oracle.com/javase/8/docs/api/java/util/SortedMap.html). This is because - * `TimestampComparator` only compares the first 42 bits of the ULong [value] (comparing the timestamp), whereas - * [equals][Snowflake.equals] compares all the bits of the [value]. `TimestampComparator` can return `0` even if - * [equals][Snowflake.equals] returns `false`, but [equals][Snowflake.equals] only returns `true` if + * [Comparator](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/Comparator.html). It + * therefore shouldn't be used to order a + * [SortedSet](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/SortedSet.html) or + * [SortedMap](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/SortedMap.html). This is + * because `TimestampComparator` only compares the first 42 bits of the ULong [value] (comparing the timestamp), + * whereas [equals][Snowflake.equals] compares all the bits of the [value]. `TimestampComparator` can return `0` + * even if [equals][Snowflake.equals] returns `false`, but [equals][Snowflake.equals] only returns `true` if * `TimestampComparator` returns `0`. */ public val TimestampComparator: Comparator = Comparator { s1, s2 -> diff --git a/core/api/core.klib.api b/core/api/core.klib.api index 0b04f2a6916..4e0b7402c0f 100644 --- a/core/api/core.klib.api +++ b/core/api/core.klib.api @@ -7123,8 +7123,6 @@ final class dev.kord.core.entity/ClientStatus { // dev.kord.core.entity/ClientSt final fun toString(): kotlin/String // dev.kord.core.entity/ClientStatus.toString|toString(){}[0] sealed class Client { // dev.kord.core.entity/ClientStatus.Client|null[0] - constructor (dev.kord.common.entity/PresenceStatus) // dev.kord.core.entity/ClientStatus.Client.|(dev.kord.common.entity.PresenceStatus){}[0] - final val status // dev.kord.core.entity/ClientStatus.Client.status|{}status[0] final fun (): dev.kord.common.entity/PresenceStatus // dev.kord.core.entity/ClientStatus.Client.status.|(){}[0] @@ -11608,9 +11606,6 @@ open class dev.kord.core.entity/User : dev.kord.core.behavior/UserBehavior { // } sealed class dev.kord.core.cache.data/ComponentData { // dev.kord.core.cache.data/ComponentData|null[0] - constructor () // dev.kord.core.cache.data/ComponentData.|(){}[0] - constructor (kotlin/Int, kotlinx.serialization.internal/SerializationConstructorMarker?) // dev.kord.core.cache.data/ComponentData.|(kotlin.Int;kotlinx.serialization.internal.SerializationConstructorMarker?){}[0] - abstract val channelTypes // dev.kord.core.cache.data/ComponentData.channelTypes|{}channelTypes[0] abstract fun (): dev.kord.common.entity.optional/Optional> // dev.kord.core.cache.data/ComponentData.channelTypes.|(){}[0] abstract val components // dev.kord.core.cache.data/ComponentData.components|{}components[0] @@ -11654,8 +11649,6 @@ sealed class dev.kord.core.cache.data/ComponentData { // dev.kord.core.cache.dat } sealed class dev.kord.core.entity.automoderation/AutoModerationAction : dev.kord.core/KordObject { // dev.kord.core.entity.automoderation/AutoModerationAction|null[0] - constructor (dev.kord.core.cache.data/AutoModerationActionData, dev.kord.core/Kord, dev.kord.common.entity/AutoModerationActionType?) // dev.kord.core.entity.automoderation/AutoModerationAction.|(dev.kord.core.cache.data.AutoModerationActionData;dev.kord.core.Kord;dev.kord.common.entity.AutoModerationActionType?){}[0] - abstract val type // dev.kord.core.entity.automoderation/AutoModerationAction.type|{}type[0] abstract fun (): dev.kord.common.entity/AutoModerationActionType // dev.kord.core.entity.automoderation/AutoModerationAction.type.|(){}[0] final val data // dev.kord.core.entity.automoderation/AutoModerationAction.data|{}data[0] @@ -11667,8 +11660,6 @@ sealed class dev.kord.core.entity.automoderation/AutoModerationAction : dev.kord } sealed class dev.kord.core.entity.automoderation/AutoModerationRule : dev.kord.core.behavior.automoderation/TypedAutoModerationRuleBehavior { // dev.kord.core.entity.automoderation/AutoModerationRule|null[0] - constructor (dev.kord.core.cache.data/AutoModerationRuleData, dev.kord.core/Kord, dev.kord.core.supplier/EntitySupplier, dev.kord.common.entity/AutoModerationRuleTriggerType?) // dev.kord.core.entity.automoderation/AutoModerationRule.|(dev.kord.core.cache.data.AutoModerationRuleData;dev.kord.core.Kord;dev.kord.core.supplier.EntitySupplier;dev.kord.common.entity.AutoModerationRuleTriggerType?){}[0] - final val actions // dev.kord.core.entity.automoderation/AutoModerationRule.actions|{}actions[0] final fun (): kotlin.collections/List // dev.kord.core.entity.automoderation/AutoModerationRule.actions.|(){}[0] final val creator // dev.kord.core.entity.automoderation/AutoModerationRule.creator|{}creator[0] @@ -11708,8 +11699,6 @@ sealed class dev.kord.core.entity.automoderation/AutoModerationRule : dev.kord.c } sealed class dev.kord.core.entity.component/SelectMenuComponent : dev.kord.core.entity.component/Component { // dev.kord.core.entity.component/SelectMenuComponent|null[0] - constructor (dev.kord.core.cache.data/ComponentData) // dev.kord.core.entity.component/SelectMenuComponent.|(dev.kord.core.cache.data.ComponentData){}[0] - final val customId // dev.kord.core.entity.component/SelectMenuComponent.customId|{}customId[0] final fun (): kotlin/String // dev.kord.core.entity.component/SelectMenuComponent.customId.|(){}[0] final val disabled // dev.kord.core.entity.component/SelectMenuComponent.disabled|{}disabled[0] @@ -11729,8 +11718,6 @@ sealed class dev.kord.core.entity.component/SelectMenuComponent : dev.kord.core. } sealed class dev.kord.core.entity.interaction.followup/FollowupMessage : dev.kord.core.behavior.interaction.followup/FollowupMessageBehavior { // dev.kord.core.entity.interaction.followup/FollowupMessage|null[0] - constructor (dev.kord.core.entity/Message) // dev.kord.core.entity.interaction.followup/FollowupMessage.|(dev.kord.core.entity.Message){}[0] - final val message // dev.kord.core.entity.interaction.followup/FollowupMessage.message|{}message[0] final fun (): dev.kord.core.entity/Message // dev.kord.core.entity.interaction.followup/FollowupMessage.message.|(){}[0] open val channelId // dev.kord.core.entity.interaction.followup/FollowupMessage.channelId|{}channelId[0] @@ -11742,8 +11729,6 @@ sealed class dev.kord.core.entity.interaction.followup/FollowupMessage : dev.kor } sealed class dev.kord.core.entity.interaction.response/MessageInteractionResponse : dev.kord.core.behavior.interaction.response/MessageInteractionResponseBehavior { // dev.kord.core.entity.interaction.response/MessageInteractionResponse|null[0] - constructor (dev.kord.core.entity/Message) // dev.kord.core.entity.interaction.response/MessageInteractionResponse.|(dev.kord.core.entity.Message){}[0] - final val message // dev.kord.core.entity.interaction.response/MessageInteractionResponse.message|{}message[0] final fun (): dev.kord.core.entity/Message // dev.kord.core.entity.interaction.response/MessageInteractionResponse.message.|(){}[0] @@ -11751,8 +11736,6 @@ sealed class dev.kord.core.entity.interaction.response/MessageInteractionRespons } sealed class dev.kord.core.entity/BaseApplication : dev.kord.core.entity/KordEntity, dev.kord.core.entity/Strategizable { // dev.kord.core.entity/BaseApplication|null[0] - constructor (dev.kord.core/Kord, dev.kord.core.supplier/EntitySupplier = ...) // dev.kord.core.entity/BaseApplication.|(dev.kord.core.Kord;dev.kord.core.supplier.EntitySupplier){}[0] - abstract val data // dev.kord.core.entity/BaseApplication.data|{}data[0] abstract fun (): dev.kord.core.cache.data/BaseApplicationData // dev.kord.core.entity/BaseApplication.data.|(){}[0] final val coverImage // dev.kord.core.entity/BaseApplication.coverImage|{}coverImage[0] @@ -11812,8 +11795,6 @@ sealed class dev.kord.core.entity/BaseApplication : dev.kord.core.entity/KordEnt } sealed class dev.kord.core.entity/ReactionEmoji { // dev.kord.core.entity/ReactionEmoji|null[0] - constructor () // dev.kord.core.entity/ReactionEmoji.|(){}[0] - abstract val mention // dev.kord.core.entity/ReactionEmoji.mention|{}mention[0] abstract fun (): kotlin/String // dev.kord.core.entity/ReactionEmoji.mention.|(){}[0] abstract val name // dev.kord.core.entity/ReactionEmoji.name|{}name[0] @@ -11868,8 +11849,6 @@ sealed class dev.kord.core.entity/ReactionEmoji { // dev.kord.core.entity/Reacti } sealed class dev.kord.core.event.gateway/DisconnectEvent : dev.kord.core.event.gateway/GatewayEvent { // dev.kord.core.event.gateway/DisconnectEvent|null[0] - constructor () // dev.kord.core.event.gateway/DisconnectEvent.|(){}[0] - final class DetachEvent : dev.kord.core.event.gateway/DisconnectEvent { // dev.kord.core.event.gateway/DisconnectEvent.DetachEvent|null[0] constructor (dev.kord.core/Kord, kotlin/Int, kotlin/Any?) // dev.kord.core.event.gateway/DisconnectEvent.DetachEvent.|(dev.kord.core.Kord;kotlin.Int;kotlin.Any?){}[0] @@ -11979,9 +11958,7 @@ sealed class dev.kord.core.event.gateway/DisconnectEvent : dev.kord.core.event.g } } -sealed class dev.kord.core.event.gateway/GatewayEvent : dev.kord.core.event/Event { // dev.kord.core.event.gateway/GatewayEvent|null[0] - constructor () // dev.kord.core.event.gateway/GatewayEvent.|(){}[0] -} +sealed class dev.kord.core.event.gateway/GatewayEvent : dev.kord.core.event/Event // dev.kord.core.event.gateway/GatewayEvent|null[0] final object dev.kord.core.cache.data/NotSerializable : kotlinx.serialization/KSerializer { // dev.kord.core.cache.data/NotSerializable|null[0] final val descriptor // dev.kord.core.cache.data/NotSerializable.descriptor|{}descriptor[0] diff --git a/gateway/api/gateway.klib.api b/gateway/api/gateway.klib.api index a3a0da74c31..41a57dd2dc7 100644 --- a/gateway/api/gateway.klib.api +++ b/gateway/api/gateway.klib.api @@ -2115,8 +2115,6 @@ final class dev.kord.gateway/WebhooksUpdate : dev.kord.gateway/DispatchEvent { / } sealed class dev.kord.gateway/Close : dev.kord.gateway/Event { // dev.kord.gateway/Close|null[0] - constructor () // dev.kord.gateway/Close.|(){}[0] - final class DiscordClose : dev.kord.gateway/Close { // dev.kord.gateway/Close.DiscordClose|null[0] constructor (dev.kord.gateway/GatewayCloseCode, kotlin/Boolean) // dev.kord.gateway/Close.DiscordClose.|(dev.kord.gateway.GatewayCloseCode;kotlin.Boolean){}[0] @@ -2149,8 +2147,6 @@ sealed class dev.kord.gateway/Close : dev.kord.gateway/Event { // dev.kord.gatew } sealed class dev.kord.gateway/Command { // dev.kord.gateway/Command|null[0] - constructor () // dev.kord.gateway/Command.|(){}[0] - final class Heartbeat : dev.kord.gateway/Command { // dev.kord.gateway/Command.Heartbeat|null[0] constructor (kotlin/Int?) // dev.kord.gateway/Command.Heartbeat.|(kotlin.Int?){}[0] @@ -2173,15 +2169,11 @@ sealed class dev.kord.gateway/Command { // dev.kord.gateway/Command|null[0] } sealed class dev.kord.gateway/DispatchEvent : dev.kord.gateway/Event { // dev.kord.gateway/DispatchEvent|null[0] - constructor () // dev.kord.gateway/DispatchEvent.|(){}[0] - abstract val sequence // dev.kord.gateway/DispatchEvent.sequence|{}sequence[0] abstract fun (): kotlin/Int? // dev.kord.gateway/DispatchEvent.sequence.|(){}[0] } sealed class dev.kord.gateway/Event { // dev.kord.gateway/Event|null[0] - constructor () // dev.kord.gateway/Event.|(){}[0] - final object DeserializationStrategy : kotlinx.serialization/DeserializationStrategy { // dev.kord.gateway/Event.DeserializationStrategy|null[0] final val descriptor // dev.kord.gateway/Event.DeserializationStrategy.descriptor|{}descriptor[0] final fun (): kotlinx.serialization.descriptors/SerialDescriptor // dev.kord.gateway/Event.DeserializationStrategy.descriptor.|(){}[0] @@ -2191,8 +2183,6 @@ sealed class dev.kord.gateway/Event { // dev.kord.gateway/Event|null[0] } sealed class dev.kord.gateway/Intent { // dev.kord.gateway/Intent|null[0] - constructor (kotlin/Int) // dev.kord.gateway/Intent.|(kotlin.Int){}[0] - final val code // dev.kord.gateway/Intent.code|{}code[0] final fun (): dev.kord.common/DiscordBitSet // dev.kord.gateway/Intent.code.|(){}[0] final val shift // dev.kord.gateway/Intent.shift|{}shift[0] diff --git a/gateway/build.gradle.kts b/gateway/build.gradle.kts index c1479ace37b..81cedadaca2 100644 --- a/gateway/build.gradle.kts +++ b/gateway/build.gradle.kts @@ -30,8 +30,9 @@ kotlin { implementation(libs.kotlin.node) implementation(npm("fast-zlib", libs.versions.fastZlib.get())) - // workaround for https://youtrack.jetbrains.com/issue/KT-43500 - // (intended to be compileOnly in commonMain only) + // workaround for https://youtrack.jetbrains.com/issue/KT-43500 / + // https://youtrack.jetbrains.com/issue/KT-64109#focus=Comments-27-10064206.0-0 / + // https://youtrack.jetbrains.com/issue/KT-61096 (intended to be compileOnly in commonMain only) implementation(projects.kspAnnotations) } } diff --git a/gradle.properties b/gradle.properties index 07ccbd8972b..79197226527 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,6 +8,10 @@ org.gradle.warning.mode=all org.gradle.kotlin.dsl.allWarningsAsErrors=true kotlin.code.style=official +# https://github.com/Kotlin/kotlinx-atomicfu/issues/448 +# https://youtrack.jetbrains.com/issue/KT-64109#focus=Comments-27-10064206.0-0 +kotlin.suppressGradlePluginWarnings=IncorrectCompileOnlyDependencyWarning + # https://github.com/Kotlin/kotlinx-atomicfu#atomicfu-compiler-plugin kotlinx.atomicfu.enableJvmIrTransformation=true kotlinx.atomicfu.enableJsIrTransformation=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9010d4761a6..a26d68c9293 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,36 +1,36 @@ [versions] # api dependencies -kotlin = "2.0.0" # https://github.com/JetBrains/kotlin +kotlin = "2.0.20" # https://github.com/JetBrains/kotlin ktor = "2.3.12" # https://github.com/ktorio/ktor kotlinx-coroutines = "1.8.1" # https://github.com/Kotlin/kotlinx.coroutines -kotlinx-serialization = "1.7.1" # https://github.com/Kotlin/kotlinx.serialization -kotlinx-datetime = "0.6.0" # https://github.com/Kotlin/kotlinx-datetime +kotlinx-serialization = "1.7.2" # https://github.com/Kotlin/kotlinx.serialization +kotlinx-datetime = "0.6.1" # https://github.com/Kotlin/kotlinx-datetime kord-cache = "0.5.4" # https://github.com/kordlib/cache # implementation dependencies kotlin-logging = "7.0.0" # https://github.com/oshai/kotlin-logging kotlin-logging-old = "3.0.5" # TODO remove after dependency is removed in rest, gateway, voice and core -slf4j = "2.0.13" # https://www.slf4j.org -kotlin-node = "20.14.10-pre.773" # https://github.com/JetBrains/kotlin-wrappers +slf4j = "2.0.16" # https://www.slf4j.org +kotlin-node = "20.14.10-pre.800" # https://github.com/JetBrains/kotlin-wrappers bignum = "0.3.10" # https://github.com/ionspin/kotlin-multiplatform-bignum -stately = "2.0.7" # https://github.com/touchlab/Stately +stately = "2.1.0" # https://github.com/touchlab/Stately fastZlib = "2.0.1" # https://github.com/timotejroiko/fast-zlib # code generation -ksp = "2.0.0-1.0.23" # https://github.com/google/ksp +ksp = "2.0.20-1.0.24" # https://github.com/google/ksp kotlinpoet = "1.18.1" # https://github.com/square/kotlinpoet # tests -junit-jupiter = "5.10.3" # https://github.com/junit-team/junit5 -junit-platform = "1.10.3" -mockk = "1.13.11" # https://github.com/mockk/mockk +junit-jupiter = "5.11.0" # https://github.com/junit-team/junit5 +junit-platform = "1.11.0" +mockk = "1.13.12" # https://github.com/mockk/mockk kbson = "0.4.0" # https://github.com/mongodb/kbson # plugins dokka = "1.9.20" # https://github.com/Kotlin/dokka kotlinx-atomicfu = "0.25.0" # https://github.com/Kotlin/kotlinx-atomicfu -binary-compatibility-validator = "0.15.1" # https://github.com/Kotlin/binary-compatibility-validator +binary-compatibility-validator = "0.16.3" # https://github.com/Kotlin/binary-compatibility-validator buildconfig = "5.4.0" # https://github.com/gmazzo/gradle-buildconfig-plugin diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 2c3521197d7..a4b76b9530d 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 68e8816d71c..2b189974c29 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +distributionSha256Sum=5b9c5eb3f9fc2c94abaea57d90bd78747ca117ddbbf96c859d3741181a12bf2a +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/kotlin-js-store/yarn.lock b/kotlin-js-store/yarn.lock index 70a1723488f..493392acc4e 100644 --- a/kotlin-js-store/yarn.lock +++ b/kotlin-js-store/yarn.lock @@ -14,10 +14,10 @@ abort-controller@3.0.0: dependencies: event-target-shim "^5.0.0" -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== +ansi-colors@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== ansi-regex@^5.0.1: version "5.0.1" @@ -68,7 +68,7 @@ braces@~3.0.2: dependencies: fill-range "^7.0.1" -browser-stdout@1.3.1: +browser-stdout@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== @@ -91,10 +91,10 @@ chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chokidar@3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== +chokidar@^3.5.3: + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== dependencies: anymatch "~3.1.2" braces "~3.0.2" @@ -127,10 +127,10 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -debug@4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== +debug@^4.3.5: + version "4.3.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" + integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== dependencies: ms "2.1.2" @@ -139,10 +139,10 @@ decamelize@^4.0.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== -diff@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== +diff@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" + integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== emoji-regex@^8.0.0: version "8.0.0" @@ -154,7 +154,7 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-string-regexp@4.0.0: +escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== @@ -176,7 +176,7 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-up@5.0.0: +find-up@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== @@ -216,7 +216,7 @@ glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob@8.1.0: +glob@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -232,7 +232,7 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -he@1.2.0: +he@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== @@ -289,7 +289,7 @@ is-unicode-supported@^0.1.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== -js-yaml@4.1.0: +js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== @@ -303,7 +303,7 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -log-symbols@4.1.0: +log-symbols@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== @@ -311,52 +311,45 @@ log-symbols@4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" -minimatch@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== - dependencies: - brace-expansion "^2.0.1" - -minimatch@^5.0.1: +minimatch@^5.0.1, minimatch@^5.1.6: version "5.1.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== dependencies: brace-expansion "^2.0.1" -mocha@10.3.0: - version "10.3.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.3.0.tgz#0e185c49e6dccf582035c05fa91084a4ff6e3fe9" - integrity sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg== - dependencies: - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.4" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "8.1.0" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "5.0.1" - ms "2.1.3" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - workerpool "6.2.1" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" +mocha@10.7.0: + version "10.7.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.0.tgz#9e5cbed8fa9b37537a25bd1f7fb4f6fc45458b9a" + integrity sha512-v8/rBWr2VO5YkspYINnvu81inSz2y3ODJrhO175/Exzor1RcEZZkizgE2A+w/CAXXoESS8Kys5E62dOHGHzULA== + dependencies: + ansi-colors "^4.1.3" + browser-stdout "^1.3.1" + chokidar "^3.5.3" + debug "^4.3.5" + diff "^5.2.0" + escape-string-regexp "^4.0.0" + find-up "^5.0.0" + glob "^8.1.0" + he "^1.2.0" + js-yaml "^4.1.0" + log-symbols "^4.1.0" + minimatch "^5.1.6" + ms "^2.1.3" + serialize-javascript "^6.0.2" + strip-json-comments "^3.1.1" + supports-color "^8.1.1" + workerpool "^6.5.1" + yargs "^16.2.0" + yargs-parser "^20.2.9" + yargs-unparser "^2.0.0" ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3: +ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -428,10 +421,10 @@ safe-buffer@^5.1.0: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== +serialize-javascript@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== dependencies: randombytes "^2.1.0" @@ -464,18 +457,11 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" -strip-json-comments@3.1.1: +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -supports-color@8.1.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -483,6 +469,13 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-color@^8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -495,10 +488,10 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -typescript@5.4.3: - version "5.4.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.3.tgz#5c6fedd4c87bee01cd7a528a30145521f8e0feff" - integrity sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg== +typescript@5.5.4: + version "5.5.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" + integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== webidl-conversions@^3.0.0: version "3.0.1" @@ -513,10 +506,10 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -workerpool@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" - integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== +workerpool@^6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" + integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== wrap-ansi@^7.0.0: version "7.0.0" @@ -542,17 +535,12 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - -yargs-parser@^20.2.2: +yargs-parser@^20.2.2, yargs-parser@^20.2.9: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-unparser@2.0.0: +yargs-unparser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== @@ -562,7 +550,7 @@ yargs-unparser@2.0.0: flat "^5.0.2" is-plain-obj "^2.1.0" -yargs@16.2.0: +yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== diff --git a/ksp-annotations/build.gradle.kts b/ksp-annotations/build.gradle.kts index 0c68a988730..ab5cd1ad016 100644 --- a/ksp-annotations/build.gradle.kts +++ b/ksp-annotations/build.gradle.kts @@ -3,7 +3,9 @@ import org.jetbrains.dokka.gradle.AbstractDokkaLeafTask plugins { `kord-internal-multiplatform-module` - // workaround for https://youtrack.jetbrains.com/issue/KT-43500 (not intended to be published) + // workaround for https://youtrack.jetbrains.com/issue/KT-43500 / + // https://youtrack.jetbrains.com/issue/KT-64109#focus=Comments-27-10064206.0-0 / + // https://youtrack.jetbrains.com/issue/KT-61096 (not intended to be published) org.jetbrains.dokka `kord-publishing` } diff --git a/ksp-processors/src/main/kotlin/generation/bitflags/BitFlagsGeneration.kt b/ksp-processors/src/main/kotlin/generation/bitflags/BitFlagsGeneration.kt index 10ae5f009c2..72697797fc1 100644 --- a/ksp-processors/src/main/kotlin/generation/bitflags/BitFlagsGeneration.kt +++ b/ksp-processors/src/main/kotlin/generation/bitflags/BitFlagsGeneration.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.bitflags import com.google.devtools.ksp.symbol.KSFile diff --git a/ksp-processors/src/main/kotlin/generation/bitflags/Builder.kt b/ksp-processors/src/main/kotlin/generation/bitflags/Builder.kt index 5bccf4fe2b3..ca0ad0acbba 100644 --- a/ksp-processors/src/main/kotlin/generation/bitflags/Builder.kt +++ b/ksp-processors/src/main/kotlin/generation/bitflags/Builder.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.bitflags import com.squareup.kotlinpoet.ClassName diff --git a/ksp-processors/src/main/kotlin/generation/bitflags/ContainsPlusMinusCopy.kt b/ksp-processors/src/main/kotlin/generation/bitflags/ContainsPlusMinusCopy.kt index 629fc6ae5db..f32bf1d10ab 100644 --- a/ksp-processors/src/main/kotlin/generation/bitflags/ContainsPlusMinusCopy.kt +++ b/ksp-processors/src/main/kotlin/generation/bitflags/ContainsPlusMinusCopy.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.bitflags import com.squareup.kotlinpoet.* diff --git a/ksp-processors/src/main/kotlin/generation/bitflags/DeprecatedNewCompanion.kt b/ksp-processors/src/main/kotlin/generation/bitflags/DeprecatedNewCompanion.kt index 9751b2e0187..ffb0973676c 100644 --- a/ksp-processors/src/main/kotlin/generation/bitflags/DeprecatedNewCompanion.kt +++ b/ksp-processors/src/main/kotlin/generation/bitflags/DeprecatedNewCompanion.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.bitflags import com.squareup.kotlinpoet.DelicateKotlinPoetApi diff --git a/ksp-processors/src/main/kotlin/generation/bitflags/Documentation.kt b/ksp-processors/src/main/kotlin/generation/bitflags/Documentation.kt index 0445a7f46a2..b54275be9b7 100644 --- a/ksp-processors/src/main/kotlin/generation/bitflags/Documentation.kt +++ b/ksp-processors/src/main/kotlin/generation/bitflags/Documentation.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.bitflags import com.squareup.kotlinpoet.CodeBlock diff --git a/ksp-processors/src/main/kotlin/generation/bitflags/FactoryFunctions.kt b/ksp-processors/src/main/kotlin/generation/bitflags/FactoryFunctions.kt index 8d62c4af4e1..5658590aeeb 100644 --- a/ksp-processors/src/main/kotlin/generation/bitflags/FactoryFunctions.kt +++ b/ksp-processors/src/main/kotlin/generation/bitflags/FactoryFunctions.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.bitflags import com.squareup.kotlinpoet.* diff --git a/ksp-processors/src/main/kotlin/generation/bitflags/Serializer.kt b/ksp-processors/src/main/kotlin/generation/bitflags/Serializer.kt index 1da43eefe47..130c08dd9fc 100644 --- a/ksp-processors/src/main/kotlin/generation/bitflags/Serializer.kt +++ b/ksp-processors/src/main/kotlin/generation/bitflags/Serializer.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.bitflags import com.squareup.kotlinpoet.KModifier.OVERRIDE diff --git a/ksp-processors/src/main/kotlin/generation/kordenum/Serializer.kt b/ksp-processors/src/main/kotlin/generation/kordenum/Serializer.kt index 91a13cd0493..864ed48e039 100644 --- a/ksp-processors/src/main/kotlin/generation/kordenum/Serializer.kt +++ b/ksp-processors/src/main/kotlin/generation/kordenum/Serializer.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.kordenum import com.squareup.kotlinpoet.KModifier.OVERRIDE diff --git a/ksp-processors/src/main/kotlin/generation/shared/EqualsHashCodeToString.kt b/ksp-processors/src/main/kotlin/generation/shared/EqualsHashCodeToString.kt index 79419e2fa17..b82c7031c88 100644 --- a/ksp-processors/src/main/kotlin/generation/shared/EqualsHashCodeToString.kt +++ b/ksp-processors/src/main/kotlin/generation/shared/EqualsHashCodeToString.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.shared import com.squareup.kotlinpoet.ClassName diff --git a/ksp-processors/src/main/kotlin/generation/shared/FileSpecForGenerationEntity.kt b/ksp-processors/src/main/kotlin/generation/shared/FileSpecForGenerationEntity.kt index e59208b219f..9021e12cdbc 100644 --- a/ksp-processors/src/main/kotlin/generation/shared/FileSpecForGenerationEntity.kt +++ b/ksp-processors/src/main/kotlin/generation/shared/FileSpecForGenerationEntity.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.shared import com.google.devtools.ksp.symbol.KSFile diff --git a/ksp-processors/src/main/kotlin/generation/shared/OptIns.kt b/ksp-processors/src/main/kotlin/generation/shared/OptIns.kt index 6231e76a2c4..23bdf44c843 100644 --- a/ksp-processors/src/main/kotlin/generation/shared/OptIns.kt +++ b/ksp-processors/src/main/kotlin/generation/shared/OptIns.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.shared import com.squareup.kotlinpoet.Annotatable diff --git a/ksp-processors/src/main/kotlin/generation/shared/SharedContent.kt b/ksp-processors/src/main/kotlin/generation/shared/SharedContent.kt index 5208a238370..7ec592410b4 100644 --- a/ksp-processors/src/main/kotlin/generation/shared/SharedContent.kt +++ b/ksp-processors/src/main/kotlin/generation/shared/SharedContent.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.shared import com.squareup.kotlinpoet.* diff --git a/rest/api/rest.api b/rest/api/rest.api index 5e867872f8f..6785469158a 100644 --- a/rest/api/rest.api +++ b/rest/api/rest.api @@ -268,7 +268,6 @@ public final class dev/kord/rest/builder/automoderation/KeywordAutoModerationRul public final class dev/kord/rest/builder/automoderation/KeywordAutoModerationRuleCreateBuilder : dev/kord/rest/builder/automoderation/AutoModerationRuleCreateBuilder, dev/kord/rest/builder/automoderation/KeywordAutoModerationRuleBuilder { public fun (Ljava/lang/String;Ldev/kord/common/entity/AutoModerationRuleEventType;)V - public synthetic fun buildTriggerMetadata ()Ldev/kord/common/entity/optional/Optional; public fun getAllowedKeywords ()Ljava/util/List; public fun getKeywords ()Ljava/util/List; public fun getRegexPatterns ()Ljava/util/List; @@ -295,6 +294,7 @@ public abstract interface class dev/kord/rest/builder/automoderation/KeywordPres public abstract fun assignPresets (Ljava/util/List;)V public abstract fun getPresets ()Ljava/util/List; public abstract fun getTriggerType ()Ldev/kord/common/entity/AutoModerationRuleTriggerType$KeywordPreset; + public abstract fun setPresets (Ljava/util/List;)V } public final class dev/kord/rest/builder/automoderation/KeywordPresetAutoModerationRuleBuilder$DefaultImpls { @@ -304,7 +304,6 @@ public final class dev/kord/rest/builder/automoderation/KeywordPresetAutoModerat public final class dev/kord/rest/builder/automoderation/KeywordPresetAutoModerationRuleCreateBuilder : dev/kord/rest/builder/automoderation/AutoModerationRuleCreateBuilder, dev/kord/rest/builder/automoderation/KeywordPresetAutoModerationRuleBuilder { public fun (Ljava/lang/String;Ldev/kord/common/entity/AutoModerationRuleEventType;)V public fun assignPresets (Ljava/util/List;)V - public synthetic fun buildTriggerMetadata ()Ldev/kord/common/entity/optional/Optional; public fun getAllowedKeywords ()Ljava/util/List; public fun getPresets ()Ljava/util/List; public fun getTriggerType ()Ldev/kord/common/entity/AutoModerationRuleTriggerType$KeywordPreset; @@ -370,7 +369,6 @@ public final class dev/kord/rest/builder/automoderation/MentionSpamAutoModeratio public final class dev/kord/rest/builder/automoderation/MentionSpamAutoModerationRuleCreateBuilder : dev/kord/rest/builder/automoderation/AutoModerationRuleCreateBuilder, dev/kord/rest/builder/automoderation/MentionSpamAutoModerationRuleBuilder { public fun (Ljava/lang/String;Ldev/kord/common/entity/AutoModerationRuleEventType;)V - public synthetic fun buildTriggerMetadata ()Ldev/kord/common/entity/optional/Optional; public fun getMentionLimit ()Ljava/lang/Integer; public fun getMentionRaidProtectionEnabled ()Ljava/lang/Boolean; public fun getTriggerType ()Ldev/kord/common/entity/AutoModerationRuleTriggerType$MentionSpam; diff --git a/rest/api/rest.klib.api b/rest/api/rest.klib.api index e87c8d57004..792f357769d 100644 --- a/rest/api/rest.klib.api +++ b/rest/api/rest.klib.api @@ -464,11 +464,13 @@ sealed interface dev.kord.rest.builder.automoderation/KeywordAutoModerationRuleB } sealed interface dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder : dev.kord.rest.builder.automoderation/AllowedKeywordsAutoModerationRuleBuilder, dev.kord.rest.builder.automoderation/BlockMessageAutoModerationRuleBuilder { // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder|null[0] - abstract val presets // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder.presets|{}presets[0] - abstract fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder.presets.|(){}[0] open val triggerType // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder.triggerType|{}triggerType[0] open fun (): dev.kord.common.entity/AutoModerationRuleTriggerType.KeywordPreset // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder.triggerType.|(){}[0] + abstract var presets // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder.presets|{}presets[0] + abstract fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder.presets.|(){}[0] + abstract fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder.presets.|(kotlin.collections.MutableList?){}[0] + abstract fun assignPresets(kotlin.collections/MutableList) // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder.assignPresets|assignPresets(kotlin.collections.MutableList){}[0] } @@ -781,8 +783,8 @@ final class dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRule final fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleCreateBuilder.allowedKeywords.|(){}[0] final fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleCreateBuilder.allowedKeywords.|(kotlin.collections.MutableList?){}[0] final var presets // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleCreateBuilder.presets|{}presets[0] - final fun (): kotlin.collections/MutableList // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleCreateBuilder.presets.|(){}[0] - final fun (kotlin.collections/MutableList) // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleCreateBuilder.presets.|(kotlin.collections.MutableList){}[0] + final fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleCreateBuilder.presets.|(){}[0] + final fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleCreateBuilder.presets.|(kotlin.collections.MutableList?){}[0] final fun assignPresets(kotlin.collections/MutableList) // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleCreateBuilder.assignPresets|assignPresets(kotlin.collections.MutableList){}[0] } @@ -6923,9 +6925,6 @@ final class dev.kord.rest/Image { // dev.kord.rest/Image|null[0] } sealed class Format { // dev.kord.rest/Image.Format|null[0] - constructor (kotlin.collections/List) // dev.kord.rest/Image.Format.|(kotlin.collections.List){}[0] - constructor (kotlin/Array...) // dev.kord.rest/Image.Format.|(kotlin.Array...){}[0] - final val extension // dev.kord.rest/Image.Format.extension|{}extension[0] final fun (): kotlin/String // dev.kord.rest/Image.Format.extension.|(){}[0] final val extensions // dev.kord.rest/Image.Format.extensions|{}extensions[0] @@ -7016,8 +7015,6 @@ final value class dev.kord.rest.ratelimit/Total { // dev.kord.rest.ratelimit/Tot } sealed class <#A: kotlin/Any, #B: kotlin/Any?> dev.kord.rest.request/Request { // dev.kord.rest.request/Request|null[0] - constructor (kotlin/String = ...) // dev.kord.rest.request/Request.|(kotlin.String){}[0] - abstract val body // dev.kord.rest.request/Request.body|{}body[0] abstract fun (): dev.kord.rest.request/RequestBody<#A>? // dev.kord.rest.request/Request.body.|(){}[0] abstract val files // dev.kord.rest.request/Request.files|{}files[0] @@ -7037,8 +7034,6 @@ sealed class <#A: kotlin/Any, #B: kotlin/Any?> dev.kord.rest.request/Request { / } sealed class <#A: kotlin/Any?, #B: dev.kord.common.entity/Choice> dev.kord.rest.builder.interaction/BaseChoiceBuilder : dev.kord.rest.builder.interaction/OptionsBuilder { // dev.kord.rest.builder.interaction/BaseChoiceBuilder|null[0] - constructor (kotlin/String, kotlin/String, dev.kord.common.entity/ApplicationCommandOptionType) // dev.kord.rest.builder.interaction/BaseChoiceBuilder.|(kotlin.String;kotlin.String;dev.kord.common.entity.ApplicationCommandOptionType){}[0] - final var choices // dev.kord.rest.builder.interaction/BaseChoiceBuilder.choices|{}choices[0] final fun (): kotlin.collections/MutableList<#B>? // dev.kord.rest.builder.interaction/BaseChoiceBuilder.choices.|(){}[0] final fun (kotlin.collections/MutableList<#B>?) // dev.kord.rest.builder.interaction/BaseChoiceBuilder.choices.|(kotlin.collections.MutableList<1:1>?){}[0] @@ -7049,9 +7044,6 @@ sealed class <#A: kotlin/Any?, #B: dev.kord.common.entity/Choice> dev.kord.rest. } sealed class <#A: kotlin/Any?> dev.kord.rest.route/Route { // dev.kord.rest.route/Route|null[0] - constructor (io.ktor.http/HttpMethod, kotlin/String, dev.kord.rest.route/ResponseMapper<#A>, kotlin/Boolean = ...) // dev.kord.rest.route/Route.|(io.ktor.http.HttpMethod;kotlin.String;dev.kord.rest.route.ResponseMapper<1:0>;kotlin.Boolean){}[0] - constructor (io.ktor.http/HttpMethod, kotlin/String, kotlinx.serialization/DeserializationStrategy<#A>, kotlin/Boolean = ...) // dev.kord.rest.route/Route.|(io.ktor.http.HttpMethod;kotlin.String;kotlinx.serialization.DeserializationStrategy<1:0>;kotlin.Boolean){}[0] - final val mapper // dev.kord.rest.route/Route.mapper|{}mapper[0] final fun (): dev.kord.rest.route/ResponseMapper<#A> // dev.kord.rest.route/Route.mapper.|(){}[0] final val method // dev.kord.rest.route/Route.method|{}method[0] @@ -7465,8 +7457,6 @@ sealed class <#A: kotlin/Any?> dev.kord.rest.route/Route { // dev.kord.rest.rout } sealed class <#A: kotlin/Number, #B: dev.kord.common.entity/Choice> dev.kord.rest.builder.interaction/NumericOptionBuilder : dev.kord.rest.builder.interaction/BaseChoiceBuilder<#A, #B> { // dev.kord.rest.builder.interaction/NumericOptionBuilder|null[0] - constructor (kotlin/String, kotlin/String, dev.kord.common.entity/ApplicationCommandOptionType) // dev.kord.rest.builder.interaction/NumericOptionBuilder.|(kotlin.String;kotlin.String;dev.kord.common.entity.ApplicationCommandOptionType){}[0] - final var maxValue // dev.kord.rest.builder.interaction/NumericOptionBuilder.maxValue|{}maxValue[0] final fun (): #A? // dev.kord.rest.builder.interaction/NumericOptionBuilder.maxValue.|(){}[0] final fun (#A?) // dev.kord.rest.builder.interaction/NumericOptionBuilder.maxValue.|(1:0?){}[0] @@ -7478,8 +7468,6 @@ sealed class <#A: kotlin/Number, #B: dev.kord.common.entity/Choice> dev.kord.res } sealed class dev.kord.rest.builder.automoderation/AutoModerationActionBuilder : dev.kord.rest.builder/RequestBuilder { // dev.kord.rest.builder.automoderation/AutoModerationActionBuilder|null[0] - constructor () // dev.kord.rest.builder.automoderation/AutoModerationActionBuilder.|(){}[0] - abstract val type // dev.kord.rest.builder.automoderation/AutoModerationActionBuilder.type|{}type[0] abstract fun (): dev.kord.common.entity/AutoModerationActionType // dev.kord.rest.builder.automoderation/AutoModerationActionBuilder.type.|(){}[0] @@ -7488,8 +7476,6 @@ sealed class dev.kord.rest.builder.automoderation/AutoModerationActionBuilder : } sealed class dev.kord.rest.builder.automoderation/AutoModerationRuleCreateBuilder : dev.kord.rest.builder.automoderation/TypedAutoModerationRuleBuilder, dev.kord.rest.builder/AuditRequestBuilder { // dev.kord.rest.builder.automoderation/AutoModerationRuleCreateBuilder|null[0] - constructor (kotlin/String, dev.kord.common.entity/AutoModerationRuleEventType) // dev.kord.rest.builder.automoderation/AutoModerationRuleCreateBuilder.|(kotlin.String;dev.kord.common.entity.AutoModerationRuleEventType){}[0] - final var actions // dev.kord.rest.builder.automoderation/AutoModerationRuleCreateBuilder.actions|{}actions[0] final fun (): kotlin.collections/MutableList // dev.kord.rest.builder.automoderation/AutoModerationRuleCreateBuilder.actions.|(){}[0] final fun (kotlin.collections/MutableList) // dev.kord.rest.builder.automoderation/AutoModerationRuleCreateBuilder.actions.|(kotlin.collections.MutableList){}[0] @@ -7520,8 +7506,6 @@ sealed class dev.kord.rest.builder.automoderation/AutoModerationRuleCreateBuilde } sealed class dev.kord.rest.builder.automoderation/AutoModerationRuleModifyBuilder : dev.kord.rest.builder.automoderation/AutoModerationRuleBuilder, dev.kord.rest.builder/AuditRequestBuilder { // dev.kord.rest.builder.automoderation/AutoModerationRuleModifyBuilder|null[0] - constructor () // dev.kord.rest.builder.automoderation/AutoModerationRuleModifyBuilder.|(){}[0] - final var actions // dev.kord.rest.builder.automoderation/AutoModerationRuleModifyBuilder.actions|{}actions[0] final fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.automoderation/AutoModerationRuleModifyBuilder.actions.|(){}[0] final fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.automoderation/AutoModerationRuleModifyBuilder.actions.|(kotlin.collections.MutableList?){}[0] @@ -7552,8 +7536,6 @@ sealed class dev.kord.rest.builder.automoderation/AutoModerationRuleModifyBuilde } sealed class dev.kord.rest.builder.component/ActionRowComponentBuilder : dev.kord.rest.builder.component/ComponentBuilder { // dev.kord.rest.builder.component/ActionRowComponentBuilder|null[0] - constructor () // dev.kord.rest.builder.component/ActionRowComponentBuilder.|(){}[0] - final var _disabled // dev.kord.rest.builder.component/ActionRowComponentBuilder._disabled|{}_disabled[0] final fun (): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.rest.builder.component/ActionRowComponentBuilder._disabled.|(){}[0] final var disabled // dev.kord.rest.builder.component/ActionRowComponentBuilder.disabled|{}disabled[0] @@ -7562,8 +7544,6 @@ sealed class dev.kord.rest.builder.component/ActionRowComponentBuilder : dev.kor } sealed class dev.kord.rest.builder.component/ButtonBuilder : dev.kord.rest.builder.component/ActionRowComponentBuilder { // dev.kord.rest.builder.component/ButtonBuilder|null[0] - constructor () // dev.kord.rest.builder.component/ButtonBuilder.|(){}[0] - final var _emoji // dev.kord.rest.builder.component/ButtonBuilder._emoji|{}_emoji[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.rest.builder.component/ButtonBuilder._emoji.|(){}[0] final var _label // dev.kord.rest.builder.component/ButtonBuilder._label|{}_label[0] @@ -7602,8 +7582,6 @@ sealed class dev.kord.rest.builder.component/ButtonBuilder : dev.kord.rest.build } sealed class dev.kord.rest.builder.component/SelectMenuBuilder : dev.kord.rest.builder.component/ActionRowComponentBuilder { // dev.kord.rest.builder.component/SelectMenuBuilder|null[0] - constructor (kotlin/String) // dev.kord.rest.builder.component/SelectMenuBuilder.|(kotlin.String){}[0] - abstract val type // dev.kord.rest.builder.component/SelectMenuBuilder.type|{}type[0] abstract fun (): dev.kord.common.entity/ComponentType // dev.kord.rest.builder.component/SelectMenuBuilder.type.|(){}[0] @@ -7624,8 +7602,6 @@ sealed class dev.kord.rest.builder.component/SelectMenuBuilder : dev.kord.rest.b } sealed class dev.kord.rest.builder.interaction/BaseCommandOptionBuilder : dev.kord.rest.builder.interaction/OptionsBuilder { // dev.kord.rest.builder.interaction/BaseCommandOptionBuilder|null[0] - constructor (kotlin/String, kotlin/String, dev.kord.common.entity/ApplicationCommandOptionType) // dev.kord.rest.builder.interaction/BaseCommandOptionBuilder.|(kotlin.String;kotlin.String;dev.kord.common.entity.ApplicationCommandOptionType){}[0] - final var options // dev.kord.rest.builder.interaction/BaseCommandOptionBuilder.options|{}options[0] final fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.interaction/BaseCommandOptionBuilder.options.|(){}[0] final fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.interaction/BaseCommandOptionBuilder.options.|(kotlin.collections.MutableList?){}[0] @@ -7634,8 +7610,6 @@ sealed class dev.kord.rest.builder.interaction/BaseCommandOptionBuilder : dev.ko } sealed class dev.kord.rest.builder.interaction/MultiApplicationCommandBuilder { // dev.kord.rest.builder.interaction/MultiApplicationCommandBuilder|null[0] - constructor () // dev.kord.rest.builder.interaction/MultiApplicationCommandBuilder.|(){}[0] - final val commands // dev.kord.rest.builder.interaction/MultiApplicationCommandBuilder.commands|{}commands[0] final fun (): kotlin.collections/MutableList // dev.kord.rest.builder.interaction/MultiApplicationCommandBuilder.commands.|(){}[0] @@ -7643,8 +7617,6 @@ sealed class dev.kord.rest.builder.interaction/MultiApplicationCommandBuilder { } sealed class dev.kord.rest.builder.interaction/OptionsBuilder : dev.kord.rest.builder.interaction/LocalizedDescriptionCreateBuilder, dev.kord.rest.builder.interaction/LocalizedNameCreateBuilder, dev.kord.rest.builder/RequestBuilder { // dev.kord.rest.builder.interaction/OptionsBuilder|null[0] - constructor (kotlin/String, kotlin/String, dev.kord.common.entity/ApplicationCommandOptionType) // dev.kord.rest.builder.interaction/OptionsBuilder.|(kotlin.String;kotlin.String;dev.kord.common.entity.ApplicationCommandOptionType){}[0] - final val type // dev.kord.rest.builder.interaction/OptionsBuilder.type|{}type[0] final fun (): dev.kord.common.entity/ApplicationCommandOptionType // dev.kord.rest.builder.interaction/OptionsBuilder.type.|(){}[0] @@ -7674,8 +7646,6 @@ sealed class dev.kord.rest.builder.interaction/OptionsBuilder : dev.kord.rest.bu } sealed class dev.kord.rest.builder.message.create/AbstractMessageCreateBuilder : dev.kord.rest.builder.message.create/MessageCreateBuilder { // dev.kord.rest.builder.message.create/AbstractMessageCreateBuilder|null[0] - constructor () // dev.kord.rest.builder.message.create/AbstractMessageCreateBuilder.|(){}[0] - final val files // dev.kord.rest.builder.message.create/AbstractMessageCreateBuilder.files|{}files[0] final fun (): kotlin.collections/MutableList // dev.kord.rest.builder.message.create/AbstractMessageCreateBuilder.files.|(){}[0] @@ -7709,8 +7679,6 @@ sealed class dev.kord.rest.builder.message.create/AbstractMessageCreateBuilder : } sealed class dev.kord.rest.builder.message.modify/AbstractMessageModifyBuilder : dev.kord.rest.builder.message.modify/MessageModifyBuilder { // dev.kord.rest.builder.message.modify/AbstractMessageModifyBuilder|null[0] - constructor () // dev.kord.rest.builder.message.modify/AbstractMessageModifyBuilder.|(){}[0] - final val files // dev.kord.rest.builder.message.modify/AbstractMessageModifyBuilder.files|{}files[0] final fun (): kotlin.collections/MutableList // dev.kord.rest.builder.message.modify/AbstractMessageModifyBuilder.files.|(){}[0] @@ -7738,8 +7706,6 @@ sealed class dev.kord.rest.builder.message.modify/AbstractMessageModifyBuilder : } sealed class dev.kord.rest.ratelimit/RequestResponse { // dev.kord.rest.ratelimit/RequestResponse|null[0] - constructor () // dev.kord.rest.ratelimit/RequestResponse.|(){}[0] - abstract val bucketKey // dev.kord.rest.ratelimit/RequestResponse.bucketKey|{}bucketKey[0] abstract fun (): dev.kord.rest.ratelimit/BucketKey? // dev.kord.rest.ratelimit/RequestResponse.bucketKey.|(){}[0] abstract val rateLimit // dev.kord.rest.ratelimit/RequestResponse.rateLimit|{}rateLimit[0] @@ -7817,8 +7783,6 @@ sealed class dev.kord.rest.ratelimit/RequestResponse { // dev.kord.rest.ratelimi } sealed class dev.kord.rest.request/RequestIdentifier { // dev.kord.rest.request/RequestIdentifier|null[0] - constructor () // dev.kord.rest.request/RequestIdentifier.|(){}[0] - final class MajorParamIdentifier : dev.kord.rest.request/RequestIdentifier { // dev.kord.rest.request/RequestIdentifier.MajorParamIdentifier|null[0] constructor (dev.kord.rest.route/Route<*>, kotlin/String) // dev.kord.rest.request/RequestIdentifier.MajorParamIdentifier.|(dev.kord.rest.route.Route<*>;kotlin.String){}[0] diff --git a/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleBuilder.kt b/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleBuilder.kt index f7f72b6904a..8f2d46957b2 100644 --- a/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleBuilder.kt +++ b/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleBuilder.kt @@ -303,18 +303,24 @@ public sealed interface KeywordPresetAutoModerationRuleBuilder : override val triggerType: KeywordPreset get() = KeywordPreset /** The internally pre-defined wordsets which will be searched for in content. */ - public val presets: MutableList? + public var presets: MutableList? /** * Use this to set [presets][KeywordPresetAutoModerationRuleBuilder.presets] for * [KeywordPresetAutoModerationRuleBuilder]. */ + @Deprecated( + "This can be replaced with 'presets', it is now a 'var'. The deprecation level will be raised to ERROR in " + + "0.16.0, to HIDDEN in 0.17.0, and this declaration will be removed in 0.18.0.", + ReplaceWith("this.run { this@run.presets = presets }", imports = ["kotlin.run"]), + DeprecationLevel.WARNING, + ) public fun assignPresets(presets: MutableList) } /** Add a [preset] to [presets][KeywordPresetAutoModerationRuleBuilder.presets]. */ public fun KeywordPresetAutoModerationRuleBuilder.preset(preset: AutoModerationRuleKeywordPresetType) { - presets?.add(preset) ?: assignPresets(mutableListOf(preset)) + presets?.add(preset) ?: run { presets = mutableListOf(preset) } } diff --git a/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleCreateBuilder.kt b/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleCreateBuilder.kt index 9a6b9f3d441..f34f0531086 100644 --- a/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleCreateBuilder.kt +++ b/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleCreateBuilder.kt @@ -74,8 +74,8 @@ public class KeywordAutoModerationRuleCreateBuilder( private var _allowedKeywords: Optional> = Optional.Missing() override var allowedKeywords: MutableList? by ::_allowedKeywords.delegate() - // one of keywords or regexPatterns is required, don't bother to send missing trigger metadata if both are missing - override fun buildTriggerMetadata(): Optional.Value = + // triggerMetadata is required for Keyword rules + override fun buildTriggerMetadata(): Optional = DiscordAutoModerationRuleTriggerMetadata( keywordFilter = _keywords.mapCopy(), regexPatterns = _regexPatterns.mapCopy(), @@ -97,9 +97,16 @@ public class KeywordPresetAutoModerationRuleCreateBuilder( eventType: AutoModerationRuleEventType, ) : AutoModerationRuleCreateBuilder(name, eventType), KeywordPresetAutoModerationRuleBuilder { - override var presets: MutableList = mutableListOf() + private var _presets: Optional> = Optional.Missing() + override var presets: MutableList? by ::_presets.delegate() /** @suppress Use `this.presets = presets` instead. */ + @Deprecated( + "Use 'this.presets = presets' instead. The deprecation level will be raised to ERROR in 0.16.0, to HIDDEN in " + + "0.17.0, and this declaration will be removed in 0.18.0.", + ReplaceWith("this.run { this@run.presets = presets }", imports = ["kotlin.run"]), + DeprecationLevel.WARNING, + ) override fun assignPresets(presets: MutableList) { this.presets = presets } @@ -107,9 +114,10 @@ public class KeywordPresetAutoModerationRuleCreateBuilder( private var _allowedKeywords: Optional> = Optional.Missing() override var allowedKeywords: MutableList? by ::_allowedKeywords.delegate() - override fun buildTriggerMetadata(): Optional.Value = + // triggerMetadata is required for KeywordPreset rules + override fun buildTriggerMetadata(): Optional = DiscordAutoModerationRuleTriggerMetadata( - presets = presets.toList().optional(), + presets = _presets.mapCopy(), allowList = _allowedKeywords.mapCopy(), ).optional() } @@ -127,9 +135,8 @@ public class MentionSpamAutoModerationRuleCreateBuilder( private var _mentionRaidProtectionEnabled: OptionalBoolean = OptionalBoolean.Missing override var mentionRaidProtectionEnabled: Boolean? by ::_mentionRaidProtectionEnabled.delegate() - // one of mentionTotalLimit or mentionRaidProtectionEnabled is required, don't bother to send missing trigger - // metadata if both are missing - override fun buildTriggerMetadata(): Optional.Value = + // triggerMetadata is required for MentionSpam rules + override fun buildTriggerMetadata(): Optional = DiscordAutoModerationRuleTriggerMetadata( mentionTotalLimit = _mentionLimit, mentionRaidProtectionEnabled = _mentionRaidProtectionEnabled, diff --git a/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleModifyBuilder.kt b/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleModifyBuilder.kt index 69e0ffeb071..76d9218073c 100644 --- a/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleModifyBuilder.kt +++ b/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleModifyBuilder.kt @@ -119,6 +119,12 @@ public class KeywordPresetAutoModerationRuleModifyBuilder : override var presets: MutableList? by ::_presets.delegate() /** @suppress Use `this.presets = presets` instead. */ + @Deprecated( + "Use 'this.presets = presets' instead. The deprecation level will be raised to ERROR in 0.16.0, to HIDDEN in " + + "0.17.0, and this declaration will be removed in 0.18.0.", + ReplaceWith("this.run { this@run.presets = presets }", imports = ["kotlin.run"]), + DeprecationLevel.WARNING, + ) override fun assignPresets(presets: MutableList) { this.presets = presets } diff --git a/settings.gradle.kts b/settings.gradle.kts index d0ab04959b0..2a6e06084e9 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,8 +1,3 @@ -plugins { - // https://github.com/gradle/foojay-toolchains - id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" -} - rootProject.name = "kord" include(