Skip to content

Commit

Permalink
Merge branch 'main' into docs-docs-docs
Browse files Browse the repository at this point in the history
# Conflicts:
#	core/src/commonMain/kotlin/entity/Icon.kt
#	core/src/commonMain/kotlin/entity/Member.kt
#	core/src/commonMain/kotlin/entity/User.kt
#	core/src/commonMain/kotlin/event/channel/thread/ThreadListSyncEvent.kt
#	core/src/commonMain/kotlin/event/interaction/ApplicationCommandCreate.kt
#	core/src/commonMain/kotlin/event/interaction/ApplicationCommandDelete.kt
#	core/src/commonMain/kotlin/event/interaction/ApplicationCommandUpdate.kt
#	core/src/commonMain/kotlin/event/message/ReactionAddEvent.kt
  • Loading branch information
NoComment1105 committed Aug 14, 2024
2 parents ec1be50 + 138ab3f commit 51c7187
Show file tree
Hide file tree
Showing 376 changed files with 47,859 additions and 8,999 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/deployment-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ jobs:
env:
KORD_TEST_TOKEN: ${{ secrets.KORD_TEST_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 11
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: --stacktrace --info build
run: ./gradlew --stacktrace --info build
release:
name: Publish artifacts
runs-on: ubuntu-latest
Expand All @@ -45,19 +45,17 @@ jobs:
SIGNING_KEY: ${{ secrets.signingKey }}
SIGNING_PASSWORD: ${{ secrets.signingPassword }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 11
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: --stacktrace --info build
run: ./gradlew --stacktrace --info build
- name: Publish with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: -x test publish
run: ./gradlew --no-parallel -x test publish
12 changes: 6 additions & 6 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ jobs:
group: pages
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 11
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build docs with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: --stacktrace --info dokkaHtmlMultiModule
run: ./gradlew --stacktrace --info dokkaHtmlMultiModule
- name: Deploy docs to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
name: Validate Gradle Wrapper
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v3
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.fleet/
.gradle/
.idea/
out/
.idea/*
!.idea/icon.png
.kotlin/

**/build/*
!**/build/generated/
Expand Down
Binary file added .idea/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
199 changes: 199 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,202 @@
# 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.
Kord expected to receive JSON strings while
[Discord is sending JSON numbers](https://github.com/discord/discord-api-docs/issues/6616).

See #911 and #912.

# 0.13.0

This release fixes a bug where the Spanish Latin America `Locale` (es-419) couldn't be deserialized correctly, so users
with that `Locale` couldn't interact with Kord bots via interactions.

## Additions

* Add `WebhookMessageCreateBuilder.appliedTags` (by @lukellmann in #899)

## Changes

* Bump `DeprecationLevel`s after 0.12.0 (by @lukellmann in #896)
* Remove deprecation from `User.discriminator` and `User.tag` (by @lukellmann in #901)
* Align `ArchiveDuration` with generated kord enums (by @lukellmann in #902)
* Deprecate `DiscordBitSetSerializer` and `Locale.Serializer` (by @lukellmann in #903)

## Fixes

* Support Spanish (Latin America) (by @gdude2002 in #906)

## Dependencies

Updated in #900

* Gradle 8.4 -> 8.5
* Kotlin 1.9.20 -> 1.9.21
* Ktor 2.3.6 -> 2.3.7
* kotlinx.serialization 1.6.1 -> 1.6.2
* kotlinx-datetime 0.4.1 -> 0.5.0
* kotlin-logging 3.0.5 -> 6.0.1
* Stately 2.0.5 -> 2.0.6
* KSP 1.9.20-1.0.14 -> 1.9.21-1.0.16
* KotlinPoet 1.15.1 -> 1.15.3
* AtomicFU 0.23.0 -> 0.23.1
* gradle-buildconfig-plugin 4.2.0 -> 5.1.0
* actions/setup-java v3 -> v4

# 0.12.0

## Additions

* Add interaction permissions to `MemberData` and `Member` (by @Tmpod in #884)
* Add `SelectDefaultValue`s (by @lukellmann in #881)
* Add `Permission.CreateGuildExpressions` and `Permission.CreateEvents` (by @lukellmann in #892)
* Add `StageInstanceCreateRequest.guildScheduledEventId` (by @lukellmann in #893)

## Changes

* Bump `DeprecationLevel`s (by @lukellmann in #879)
* Use debug log level for unknown gateway event names (by @viztea in #890)
* Add common `MessageBuilder` supertype (by @lukellmann in #891)

## Fixes

* Fix `DiscordAuditLogEntry.userId` nullability (by @lukellmann in #885)

## Dependencies

Updated in #883, #888 and #894

* Gradle 8.3 -> 8.4
* Kotlin 1.9.10 -> 1.9.20
* Ktor 2.3.4 -> 2.3.6
* kotlinx.serialization 1.6.0 -> 1.6.1
* Stately 2.0.2 -> 2.0.5
* KSP 1.9.10-1.0.13 -> 1.9.20-1.0.14
* KotlinPoet 1.14.2 -> 1.15.1
* JUnit 5 5.10.0 -> 5.10.1
* MockK 1.13.7 -> 1.13.8
* Dokka 1.9.0 -> 1.9.10
* AtomicFU 0.22.0 -> 0.23.0
* gradle-buildconfig-plugin 4.1.2 -> 4.2.0

# 0.11.0

## Additions

* Add interaction channel field (by @NoComment1105 in #810)
* Add `avatar_decoration` to user (by @NoComment1105 in #852)
* Add stage channel create functions (by @NoComment1105 in #856)
* Implement custom status (by @DRSchlaubi and @lukellmann in #857)
* Allow modifying `GuildMemberFlags` (by @lukellmann in #865)
* Add `RoleFlags` (by @lukellmann in #866)
* Add `AttachmentFlags` (by @lukellmann in #867)
* Add `MediaChannel`s (by @lukellmann in #853)
* Allow modifying `GuildOnboarding` (by @lukellmann in #819)
* Add `ReactionAddEvent.messageAuthorId` (by @lukellmann in #873)
* Add new `AuditLogEvent`s (by @lukellmann in #874)
* Add `with_counts` param for `GET` `/users/@me/guilds` (by @lukellmann in #875)
* Add `TeamMemberRole` (by @lukellmann in #876)
* Add `AuditLogEntryOptionalInfo.integrationType` (by @lukellmann in #877)

## Changes

* Bump `DeprecationLevel`s (by @lukellmann in #844)
* Generate bit flags (by @DRSchlaubi and @lukellmann in #766)
* Bring kord enum API closer to bit flags API (by @lukellmann in #861)
* Replace companion object serializers (by @lukellmann in #869)
* Remove type parameter from `Choice` (by @lukellmann in #868)

## Fixes

* Correctly close zlib stream when gateway disconnects (by @DRSchlaubi in #849)
* Fix usage of `BigInteger` in `DiscordBitSet.value` (by @lukellmann in #864)
* Fix deserialization of `DiscordApplication` (by @lukellmann in #871)

## Dependencies

Updated in #842, #859 and #872

* Gradle 8.1 -> 8.3
* Kotlin 1.8.21 -> 1.9.10
* Ktor 2.3.0 -> 2.3.4
* kotlinx.coroutines 1.7.1 -> 1.7.3
* kotlinx.serialization 1.5.1 -> 1.6.0
* kotlinx-datetime 0.4.0 -> 0.4.1
* kotlin-node 18.16.3-pre.546 -> 18.16.12-pre.619
* Stately 2.0.0-rc1 -> 2.0.2
* KSP 1.8.21-1.0.11 -> 1.9.10-1.0.13
* KotlinPoet 1.13.2 -> 1.14.2
* JUnit 5 5.9.3 -> 5.10.0
* MockK 1.13.5 -> 1.13.7
* SLF4J 2.0.7 -> 2.0.9
* Dokka 1.8.10 -> 1.9.0
* AtomicFU 0.20.2 -> 0.22.0
* Binary compatibility validator 0.13.1 -> 0.13.2
* gradle-buildconfig-plugin 4.0.4 -> 4.1.2
* Foojay Toolchains Plugin 0.4.0 -> 0.7.0
* actions/checkout v3 -> v4

## House-keeping

* Remove unnecessary `RedundantVisibilityModifier` suppression (by @lukellmann in #858)
* Don't use value class `Reset` with `AtomicRef` (by @DRSchlaubi and @lukellmann in #863)

# 0.10.0

## Additions
Expand Down
37 changes: 13 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
# Kord

[![Discord](https://img.shields.io/discord/556525343595298817.svg?color=&label=Kord&logo=discord&style=for-the-badge)](https://discord.gg/6jcx5ev)
[![Download](https://img.shields.io/maven-central/v/dev.kord/kord-core.svg?label=Maven%20Central&style=for-the-badge)](https://search.maven.org/search?q=g:%22dev.kord%22%20AND%20a:%22kord-core%22)
[![Download](https://img.shields.io/maven-central/v/dev.kord/kord-core.svg?label=Maven%20Central&style=for-the-badge)](https://central.sonatype.com/artifact/dev.kord/kord-core)
[![Github CI status (branch)](https://img.shields.io/github/actions/workflow/status/kordlib/kord/deployment-ci.yml?branch=main&label=CI&style=for-the-badge)]()

__Kord is still in an experimental stage, as such we can't guarantee API stability between releases. While we'd love for
you to try out our library, we don't recommend you use this in production just yet.__

If you have any feedback, we'd love to hear it, hit us up on discord or write up an issue if you have any suggestions!

## What is Kord?

Kord is a [coroutine-based](https://kotlinlang.org/docs/reference/coroutines-overview.html), modularized implementation
of the Discord API, written 100% in [Kotlin](https://kotlinlang.org/).

If you have any feedback, we'd love to hear it, hit us up on discord or write up an issue if you have any suggestions!

## Why use Kord

Kord was created as an answer to the frustrations of writing Discord bots with other JVM libraries, which either use
Expand Down Expand Up @@ -61,44 +56,38 @@ Replace `{version}` with the latest version number on maven central.

For Snapshots replace `{version}` with `{branch}-SNAPSHOT`

e.g: `feature-mpp-SNAPSHOT` for the branch `feature/mpp`
e.g: `feature-amazing-thing-SNAPSHOT` for the branch `feature/amazing-thing`

For Snapshots for the branch `main` replace `{version}` with `{nextPlannedVersion}-SNAPSHOT` (see `nextPlannedVersion`
in [`gradle.properties`](gradle.properties))

[![Download](https://img.shields.io/maven-central/v/dev.kord/kord-core.svg?label=Maven%20Central&style=for-the-badge)](https://search.maven.org/search?q=g:%22dev.kord%22%20AND%20a:%22kord-core%22)
[![Download](https://img.shields.io/maven-central/v/dev.kord/kord-core.svg?label=Maven%20Central&style=for-the-badge)](https://central.sonatype.com/artifact/dev.kord/kord-core)

### Gradle (groovy)
### Gradle (Kotlin)

```groovy
```kotlin
repositories {
mavenCentral()
// Kord Snapshots Repository (Optional):
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven("https://oss.sonatype.org/content/repositories/snapshots")
}
```

```groovy
dependencies {
implementation("dev.kord:kord-core:{version}")
}
```

### Gradle (kotlin)
### Gradle (Groovy)

```kotlin
```groovy
repositories {
mavenCentral()
// Kord Snapshots Repository (Optional):
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
```
---

```kotlin
dependencies {
implementation("dev.kord:kord-core:{version}")
}
Expand Down
6 changes: 6 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ repositories {
mavenCentral()
}

kotlin {
compilerOptions {
allWarningsAsErrors = true
}
}

dependencies {
implementation(libs.bundles.pluginsForBuildSrc)
}
3 changes: 3 additions & 0 deletions buildSrc/src/main/kotlin/BinaryCompatibility.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import kotlinx.validation.ApiValidationExtension
import kotlinx.validation.ExperimentalBCVApi

fun ApiValidationExtension.applyKordBCVOptions() {
nonPublicMarkers += "dev.kord.common.annotation.KordInternal"
@OptIn(ExperimentalBCVApi::class)
klib.enabled = true
}
Loading

0 comments on commit 51c7187

Please sign in to comment.