Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feature/native
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/gradle-wrapper-validation.yml
#	buildSrc/src/main/kotlin/kord-internal-multiplatform-module.gradle.kts
#	buildSrc/src/main/kotlin/kord-module.gradle.kts
#	buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts
#	core/api/core.api
#	core/api/core.klib.api
#	core/live-tests/build.gradle.kts
#	core/src/commonMain/kotlin/Kord.kt
#	gateway/api/gateway.api
#	gateway/api/gateway.klib.api
#	gateway/src/commonMain/kotlin/Gateway.kt
#	gateway/src/commonMain/kotlin/Inflater.kt
#	gateway/src/commonMain/kotlin/Utils.kt
#	gradle/libs.versions.toml
#	voice/api/voice.api
#	voice/src/commonMain/kotlin/gateway/VoiceGateway.kt
  • Loading branch information
DRSchlaubi committed Jul 2, 2024
2 parents c598338 + a770ecf commit 3a4c92a
Show file tree
Hide file tree
Showing 119 changed files with 22,637 additions and 17,648 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.gradle/
.idea/*
!.idea/icon.png
.kotlin/

**/build/*
!**/build/generated/
Expand Down
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,59 @@
# 0.14.0

## Additions

* Support other `SerialFormat`s in `LongOrStringSerializer` (#937)

## Changes

* Bump `DeprecationLevel`s after 0.13.0 (#908)
* Rewrite `Event.DeserializationStrategy` (#923)
* Deprecate application command events (#927)
* Rewrite `VoiceEvent.DeserializationStrategy` (#925)
* Switch to OkHttp as http client on jvm (by @DRSchlaubi in #928)

## Fixes

* `DiscordVoiceState.member` uses incorrect serial name (by @viztea in #914)
* Use actual zero width space in `EmbedBuilder` (by @matytyma in #917)
* Fix some cache links (#934)

## Dependencies

Updated in #920, #929 and #943

* Gradle 8.5 -> 8.7
* Kotlin 1.9.21 -> 1.9.24
* Ktor 2.3.7 -> 2.3.11
* kotlinx.coroutines 1.7.3 -> 1.8.1
* kotlinx.serialization 1.6.2 -> 1.6.3
* kotlinx-datetime 0.5.0 -> 0.6.0
* kotlin-logging 6.0.1 -> 6.0.9
* SLF4J 2.0.9 -> 2.0.13
* kotlin-node 18.16.12-pre.619 -> 20.11.5-pre.751
* kotlin-multiplatform-bignum 0.3.8 -> 0.3.9
* Stately 2.0.6 -> 2.0.7
* KSP 1.9.21-1.0.16 -> 1.9.24-1.0.20
* KotlinPoet 1.15.3 -> 1.16.0
* JUnit Jupiter 5.10.1 -> 5.10.2
* MockK 1.13.8 -> 1.13.11
* Dokka 1.9.10 -> 1.9.20
* AtomicFU 0.23.1 -> 0.24.0
* Binary compatibility validator 0.13.2 -> 0.15.0-Beta.2
* gradle-buildconfig-plugin 5.1.0 -> 5.3.5
* Foojay Toolchains Plugin 0.7.0 -> 0.8.0
* Replace gradle/gradle-build-action with gradle/actions/setup-gradle
* Replace gradle/wrapper-validation-action with gradle/actions/wrapper-validation

## House-keeping

* Update README (#915)
* Disable timeouts for Kotlin/JS tests (#926)
* Remove unused resource files (#935)
* Enable binary compatibility validation for KLibs (#929)
* Fix test related Gradle deprecation warnings (#936)
* Create `sourceLink` `URL` with non-deprecated `URI` constructor (by @SebastianAigner in #938)

# 0.13.1

This release fixes an exception when trying to deserialize `Permissions` contained in `GuildAuditLogEntryCreateEvent`s.
Expand Down
25 changes: 4 additions & 21 deletions buildSrc/src/main/kotlin/Compiler.kt
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
import kotlinx.atomicfu.plugin.gradle.AtomicFUPluginExtension
import org.gradle.api.Project
import org.gradle.api.artifacts.VersionCatalogsExtension
import org.gradle.api.NamedDomainObjectSet
import org.gradle.kotlin.dsl.assign
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.getByType
import org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet

object OptIns {
const val coroutines = "kotlinx.coroutines.ExperimentalCoroutinesApi"
}

val kordOptIns = listOf(
"kotlin.contracts.ExperimentalContracts",

Expand All @@ -30,18 +22,9 @@ fun KotlinCommonCompilerOptions.applyKordCompilerOptions() {
freeCompilerArgs.add("-Xexpect-actual-classes")
}

fun KotlinSourceSet.applyKordOptIns() {
languageSettings {
internal fun NamedDomainObjectSet<KotlinSourceSet>.applyKordTestOptIns() {
named { it.contains("test", ignoreCase = true) }.configureEach {
// allow `ExperimentalCoroutinesApi` for `TestScope.currentTime`
if ("Test" in name) optIn(OptIns.coroutines)
kordOptIns.forEach(::optIn)
}
}

fun Project.configureAtomicFU() {
// https://github.com/Kotlin/kotlinx-atomicfu/issues/210
configure<AtomicFUPluginExtension> {
val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
dependenciesVersion = libs.findVersion("kotlinx-atomicfu").get().requiredVersion
languageSettings.optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
}
}
9 changes: 6 additions & 3 deletions buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
org.jetbrains.kotlin.multiplatform
org.jetbrains.kotlin.plugin.serialization
org.jetbrains.dokka
`kotlinx-atomicfu`
org.jetbrains.kotlinx.atomicfu
org.jetbrains.kotlinx.`binary-compatibility-validator`
com.google.devtools.ksp
}
Expand Down Expand Up @@ -45,6 +45,11 @@ kotlin {
explicitApi()
jvmToolchain(Jvm.target)

compilerOptions {
applyKordCompilerOptions()
optIn.addAll(kordOptIns)
}

sourceSets {
all {
applyKordOptIns()
Expand All @@ -61,8 +66,6 @@ kotlin {
}
}

configureAtomicFU()

tasks {
withType<Test>().configureEach {
useJUnitPlatform()
Expand Down
1,180 changes: 590 additions & 590 deletions common/api/common.api

Large diffs are not rendered by default.

7,981 changes: 4,903 additions & 3,078 deletions common/api/common.klib.api

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ public sealed class ActivityFlag(
)
}


/**
* Returns an instance of [ActivityFlag] with [ActivityFlag.shift] equal to the specified
* [shift].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public sealed class ActivityType(
)
}


/**
* Returns an instance of [ActivityType] with [ActivityType.code] equal to the specified
* [code].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public sealed class AllowedMentionType(
)
}


/**
* Returns an instance of [AllowedMentionType] with [AllowedMentionType.value] equal to the
* specified [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ public sealed class ApplicationCommandOptionType(
)
}


/**
* Returns an instance of [ApplicationCommandOptionType] with
* [ApplicationCommandOptionType.type] equal to the specified [type].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public sealed class ApplicationCommandPermissionType(
)
}


/**
* Returns an instance of [ApplicationCommandPermissionType] with
* [ApplicationCommandPermissionType.value] equal to the specified [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public sealed class ApplicationCommandType(
)
}


/**
* Returns an instance of [ApplicationCommandType] with [ApplicationCommandType.value] equal
* to the specified [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ public sealed class ApplicationFlag(
)
}


/**
* Returns an instance of [ApplicationFlag] with [ApplicationFlag.shift] equal to the
* specified [shift].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ public sealed class ApplicationRoleConnectionMetadataType(
)
}


/**
* Returns an instance of [ApplicationRoleConnectionMetadataType] with
* [ApplicationRoleConnectionMetadataType.value] equal to the specified [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ public sealed class AttachmentFlag(
)
}


/**
* Returns an instance of [AttachmentFlag] with [AttachmentFlag.shift] equal to the
* specified [shift].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ public sealed class AuditLogEvent(
)
}


/**
* Returns an instance of [AuditLogEvent] with [AuditLogEvent.value] equal to the specified
* [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public sealed class AutoModerationActionType(
)
}


/**
* Returns an instance of [AutoModerationActionType] with [AutoModerationActionType.value]
* equal to the specified [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public sealed class AutoModerationRuleEventType(
)
}


/**
* Returns an instance of [AutoModerationRuleEventType] with
* [AutoModerationRuleEventType.value] equal to the specified [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public sealed class AutoModerationRuleKeywordPresetType(
)
}


/**
* Returns an instance of [AutoModerationRuleKeywordPresetType] with
* [AutoModerationRuleKeywordPresetType.value] equal to the specified [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ public sealed class AutoModerationRuleTriggerType(
)
}


/**
* Returns an instance of [AutoModerationRuleTriggerType] with
* [AutoModerationRuleTriggerType.value] equal to the specified [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public sealed class ButtonStyle(
)
}


/**
* Returns an instance of [ButtonStyle] with [ButtonStyle.value] equal to the specified
* [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ public sealed class ChannelFlag(
)
}


/**
* Returns an instance of [ChannelFlag] with [ChannelFlag.shift] equal to the specified
* [shift].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ public sealed class ChannelType(
)
}


/**
* Returns an instance of [ChannelType] with [ChannelType.value] equal to the specified
* [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ public sealed class ComponentType(
)
}


/**
* Returns an instance of [ComponentType] with [ComponentType.value] equal to the specified
* [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public sealed class DefaultMessageNotificationLevel(
)
}


/**
* Returns an instance of [DefaultMessageNotificationLevel] with
* [DefaultMessageNotificationLevel.value] equal to the specified [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public sealed class DiscordConnectionVisibility(
)
}


/**
* Returns an instance of [DiscordConnectionVisibility] with
* [DiscordConnectionVisibility.value] equal to the specified [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ public sealed class EmbedType(
)
}


/**
* Returns an instance of [EmbedType] with [EmbedType.value] equal to the specified [value].
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public sealed class ExplicitContentFilter(
)
}


/**
* Returns an instance of [ExplicitContentFilter] with [ExplicitContentFilter.value] equal
* to the specified [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ public sealed class ForumLayoutType(
)
}


/**
* Returns an instance of [ForumLayoutType] with [ForumLayoutType.value] equal to the
* specified [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ public sealed class GuildFeature(
)
}


/**
* Returns an instance of [GuildFeature] with [GuildFeature.value] equal to the specified
* [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ public sealed class GuildMemberFlag(
)
}


/**
* Returns an instance of [GuildMemberFlag] with [GuildMemberFlag.shift] equal to the
* specified [shift].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public sealed class GuildScheduledEventPrivacyLevel(
)
}


/**
* Returns an instance of [GuildScheduledEventPrivacyLevel] with
* [GuildScheduledEventPrivacyLevel.value] equal to the specified [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public sealed class GuildScheduledEventStatus(
)
}


/**
* Returns an instance of [GuildScheduledEventStatus] with [GuildScheduledEventStatus.value]
* equal to the specified [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public sealed class IntegrationExpireBehavior(
)
}


/**
* Returns an instance of [IntegrationExpireBehavior] with [IntegrationExpireBehavior.value]
* equal to the specified [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ public sealed class InteractionResponseType(
)
}


/**
* Returns an instance of [InteractionResponseType] with [InteractionResponseType.type]
* equal to the specified [type].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ public sealed class InteractionType(
)
}


/**
* Returns an instance of [InteractionType] with [InteractionType.type] equal to the
* specified [type].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public sealed class InviteTargetType(
)
}


/**
* Returns an instance of [InviteTargetType] with [InviteTargetType.value] equal to the
* specified [value].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public sealed class MFALevel(
)
}


/**
* Returns an instance of [MFALevel] with [MFALevel.value] equal to the specified [value].
*/
Expand Down
Loading

0 comments on commit 3a4c92a

Please sign in to comment.