Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update KordEx, Kotlin, Gradle, fix small K2 warnings #413

Merged
merged 5 commits into from
Aug 20, 2024

Conversation

gdude2002
Copy link
Contributor

@gdude2002 gdude2002 commented Aug 18, 2024

This PR makes the following changes:

  • Update Kotlin to 2.0.10
  • Update KordEx to version 2 - please note that it seems Reposilite might not maintain old snapshots
  • Update Gradle to 8.10
  • Add an explicit Java source/target compatibility block in the build script, to make sure it's consistent with the Kotlin configuration
  • Fix a few small warnings surfaced by the K2 compiler (e.g. unnecessary non-null assertions)
  • Configure the about command - happy to update this if it doesn't suit

image

When working in K2 mode going forward, please note that K2 mode in the IntelliJ Kotlin Plugin is buggy and may incorrectly complain about suspending function calls within non-suspending functions, even when the enclosing block is suspending.

@NoComment1105
Copy link
Member

It's looking good, did you run the gradle wrapper update twice? I see the jar change but no change to scripts. What is the point of the dev task? What's the issue with the run task?

@gdude2002
Copy link
Contributor Author

gdude2002 commented Aug 18, 2024

I ran it a bunch of times wondering about the script changes too, but nope, there's no script changes this time apparently?

The run task is part of the application plugin, which is responsible for setting up your project's main distribution. Configuring the application plugin to run the bot with the devMode property means that it'll also be set in your production distributions, which is probably not something you actually want.

@NoComment1105
Copy link
Member

What is the point of the dev mode property then. Why is it suddenly "needed"

@gdude2002
Copy link
Contributor Author

gdude2002 commented Aug 18, 2024

It's just an automatic way to turn on dev mode, which is exposed as a property in your bot builder (devMode). It's a small feature that was added in KordEx 2 that would usually be handled by the Gradle plugin - mostly intended to allow bots to conditionally run extra debugging code or whatever in development.

More info on the other ways to set it can be found here if preferred.

@NoComment1105
Copy link
Member

If it's a bot builder property, could you remove this task and use the environment variable we already have to set it instead. The variable is either development or production so you'll need to check the string.

@gdude2002
Copy link
Contributor Author

Yeah sure, let me check on that.

@gdude2002
Copy link
Contributor Author

It looks like you set that by setting ENVIRONMENT to development? Is that correct?

@NoComment1105
Copy link
Member

Yep that's correct

@gdude2002
Copy link
Contributor Author

Ah, well in that case KordEx will detect it automatically, so no need for the task.

@gdude2002
Copy link
Contributor Author

Ah wait I forgot to do something, don't merge this yet

@gdude2002
Copy link
Contributor Author

Alright, sorted that and updated the PR description with a screenshot.

I'd recommend quickly reading the docs to learn what you can actually do with the about command, but I pretty much just moved the existing one over for now.

@NoComment1105
Copy link
Member

I'd like to see all the emojis removed from the buttons and the title set back to what the original embed showed please.

@gdude2002
Copy link
Contributor Author

gdude2002 commented Aug 18, 2024 via email

@gdude2002
Copy link
Contributor Author

I've done that and updated the PR comment to correspond.

@gdude2002
Copy link
Contributor Author

Oh? It's missing a snapshot? That can't be right..

@gdude2002
Copy link
Contributor Author

Alright, well I turned on the option to preserve old snapshots last night, but it seems Reposilite didn't actually save that, so it still deleted the snapshot this PR was building against. I'm gonna poke the Reposilite Discord and ask.

@gdude2002
Copy link
Contributor Author

gdude2002 commented Aug 20, 2024

Currently blocked by HyacinthBots/doc-generator#10

No longer blocked

Hopefully this is it!
@gdude2002
Copy link
Contributor Author

Are we finally there? I think we might be!

Copy link
Member

@NoComment1105 NoComment1105 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thanks

@NoComment1105 NoComment1105 merged commit 58143e7 into HyacinthBots:develop Aug 20, 2024
1 check passed
NoComment1105 added a commit that referenced this pull request Sep 20, 2024
* Bump detekt from 1.23.1 to 1.23.3 (#362)

Bumps `detekt` from 1.23.1 to 1.23.3.

Updates `io.gitlab.arturbosch.detekt:detekt-formatting` from 1.23.1 to 1.23.3
- [Release notes](https://github.com/detekt/detekt/releases)
- [Commits](detekt/detekt@v1.23.1...v1.23.3)

Updates `io.gitlab.arturbosch.detekt` from 1.23.1 to 1.23.3
- [Release notes](https://github.com/detekt/detekt/releases)
- [Commits](detekt/detekt@v1.23.1...v1.23.3)

---
updated-dependencies:
- dependency-name: io.gitlab.arturbosch.detekt:detekt-formatting
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.gitlab.arturbosch.detekt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump kotlin from 1.9.10 to 1.9.20 (#363)

Bumps `kotlin` from 1.9.10 to 1.9.20.

Updates `org.jetbrains.kotlin.jvm` from 1.9.10 to 1.9.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](JetBrains/kotlin@v1.9.10...v1.9.20)

Updates `org.jetbrains.kotlin.plugin.serialization` from 1.9.10 to 1.9.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](JetBrains/kotlin@v1.9.10...v1.9.20)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin.jvm
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin.plugin.serialization
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump org.litote.kmongo:kmongo-coroutine-serialization (#364)

Bumps [org.litote.kmongo:kmongo-coroutine-serialization](https://github.com/Litote/kmongo) from 4.10.0 to 4.11.0.
- [Release notes](https://github.com/Litote/kmongo/releases)
- [Commits](Litote/kmongo@kmongo-4.10.0...kmongo-4.11.0)

---
updated-dependencies:
- dependency-name: org.litote.kmongo:kmongo-coroutine-serialization
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump io.github.oshai:kotlin-logging from 5.1.0 to 5.1.1 (#366)

Bumps [io.github.oshai:kotlin-logging](https://github.com/oshai/kotlin-logging) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/oshai/kotlin-logging/releases)
- [Changelog](https://github.com/oshai/kotlin-logging/blob/master/ChangeLog-old.md)
- [Commits](oshai/kotlin-logging@5.1.0...5.1.1)

---
updated-dependencies:
- dependency-name: io.github.oshai:kotlin-logging
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump AButler/upload-release-assets from 2.0 to 3.0 (#367)

Bumps [AButler/upload-release-assets](https://github.com/abutler/upload-release-assets) from 2.0 to 3.0.
- [Release notes](https://github.com/abutler/upload-release-assets/releases)
- [Commits](AButler/upload-release-assets@v2.0...v3.0)

---
updated-dependencies:
- dependency-name: AButler/upload-release-assets
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump kotlin from 1.9.20 to 1.9.21 (#368)

* Bump kotlin from 1.9.20 to 1.9.21

Bumps `kotlin` from 1.9.20 to 1.9.21.

Updates `org.jetbrains.kotlin.jvm` from 1.9.20 to 1.9.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](JetBrains/kotlin@v1.9.20...v1.9.21)

Updates `org.jetbrains.kotlin.plugin.serialization` from 1.9.20 to 1.9.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](JetBrains/kotlin@v1.9.20...v1.9.21)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin.jvm
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin.plugin.serialization
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update libs.versions.toml

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: NoComment <[email protected]>

* Bump detekt from 1.23.3 to 1.23.4 (#369)

Bumps `detekt` from 1.23.3 to 1.23.4.

Updates `io.gitlab.arturbosch.detekt:detekt-formatting` from 1.23.3 to 1.23.4
- [Release notes](https://github.com/detekt/detekt/releases)
- [Commits](detekt/detekt@v1.23.3...v1.23.4)

Updates `io.gitlab.arturbosch.detekt` from 1.23.3 to 1.23.4
- [Release notes](https://github.com/detekt/detekt/releases)
- [Commits](detekt/detekt@v1.23.3...v1.23.4)

---
updated-dependencies:
- dependency-name: io.gitlab.arturbosch.detekt:detekt-formatting
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.gitlab.arturbosch.detekt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump ch.qos.logback:logback-classic from 1.4.11 to 1.4.14 (#371)

Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.4.11 to 1.4.14.
- [Commits](qos-ch/logback@v_1.4.11...v_1.4.14)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/setup-java from 3 to 4 (#372)

Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](actions/setup-java@v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/upload-artifact from 3 to 4 (#374)

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update to Kordex 1.7.1-SNAPSHOT

* Remove redundant codec

* Update dependencies and upgradle (still hilarious)

* Update dependencies

* Fix cancelling reminders with moderation command.

Turns out we were trying to cancel the reminder for the command executor haha very optimal

* Add 'Auto-invite Moderator Role' option (#382)

* Add 'Auto-invite Moderator Role' option

* Fix v7 migration

* Fix compilation

* Fix unpinning/pinning of old messages causing edit log (#381)

* Update dependencies

* Bump org.kohsuke:github-api from 1.318 to 1.319 (#385)

Bumps [org.kohsuke:github-api](https://github.com/hub4j/github-api) from 1.318 to 1.319.
- [Release notes](https://github.com/hub4j/github-api/releases)
- [Changelog](https://github.com/hub4j/github-api/blob/main/CHANGELOG.md)
- [Commits](hub4j/github-api@github-api-1.318...github-api-1.319)

---
updated-dependencies:
- dependency-name: org.kohsuke:github-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump kotlin from 1.9.22 to 1.9.23 (#390)

Bumps `kotlin` from 1.9.22 to 1.9.23.

Updates `org.jetbrains.kotlin.jvm` from 1.9.22 to 1.9.23
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.9.23/ChangeLog.md)
- [Commits](JetBrains/kotlin@v1.9.22...v1.9.23)

Updates `org.jetbrains.kotlin.plugin.serialization` from 1.9.22 to 1.9.23
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.9.23/ChangeLog.md)
- [Commits](JetBrains/kotlin@v1.9.22...v1.9.23)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin.jvm
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin.plugin.serialization
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump ch.qos.logback:logback-classic from 1.5.0 to 1.5.3 (#388)

Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.5.0 to 1.5.3.
- [Commits](qos-ch/logback@v_1.5.0...v_1.5.3)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: NoComment <[email protected]>

* Create a moderation arguments class to shrink the arguments down

* Revert "Create a moderation arguments class to shrink the arguments down"

This reverts commit b82f7ef.

* Allow multiple roles to be pinged on auto-threads (#386)

* Allow multiple roles to be pinged in auto-threaded channels

* Add migration for new issue

* Fix doc file

* Update dependencies

* Implement temporary bans (#391)

* Revert "Create a moderation arguments class to shrink the arguments down"

This reverts commit b82f7ef.

* Implement temporary bans

* Apply review comments
- Remove temp-ban remove, incorporate into unban
- Remove soft-ban, incorporate into main ban command

* Fix typo in command option description

* Fix permissions being lost by locked channels when unlocked (#395)

* Begin work on storing original permissions when locking channels

* Complete work on storing original permission for locked channels

* Bump ch.qos.logback:logback-classic from 1.5.3 to 1.5.6 (#398)

Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.5.3 to 1.5.6.
- [Commits](qos-ch/logback@v_1.5.3...v_1.5.6)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump io.github.oshai:kotlin-logging from 6.0.4 to 6.0.9 (#397)

Bumps [io.github.oshai:kotlin-logging](https://github.com/oshai/kotlin-logging) from 6.0.4 to 6.0.9.
- [Release notes](https://github.com/oshai/kotlin-logging/releases)
- [Changelog](https://github.com/oshai/kotlin-logging/blob/master/ChangeLog-old.md)
- [Commits](oshai/kotlin-logging@6.0.4...6.0.9)

---
updated-dependencies:
- dependency-name: io.github.oshai:kotlin-logging
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: NoComment <[email protected]>

* Fix lily being unable to unlock channels after she locks them

* Hopefully avoid funny embeds appearing when messages don't change properly

* Bump org.kohsuke:github-api from 1.321 to 1.322 (#406)

Bumps [org.kohsuke:github-api](https://github.com/hub4j/github-api) from 1.321 to 1.322.
- [Release notes](https://github.com/hub4j/github-api/releases)
- [Changelog](https://github.com/hub4j/github-api/blob/main/CHANGELOG.md)
- [Commits](hub4j/github-api@github-api-1.321...github-api-1.322)

---
updated-dependencies:
- dependency-name: org.kohsuke:github-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update to Kotlin 2

* Update to Java 21 😎

* Update dependencies and gradle

* Update KordEx, Kotlin, Gradle, fix small K2 warnings (#413)

* Update KordEx, Kotlin, Gradle, fix small K2 warnings

* Yeet unnecessary Gradle task

* Configure the about command

* Address comments

* Update KordEx to 2.1.0

Hopefully this is it!

* Update to KordEx 2.2.0, other dependencies

* Package restructure (#417)

* Refactor package structure attempt 2

* Fix package references :D

* Split out config view and clear

* More event logging (#410)

* Start work on audit-log event based logging

* Refactor it all because yes

* Create action transferring database to move important information over to the event action

* Log Kicks, send quick actions to db, generalise channel creation logs

* Start work on channel updates

* Add the rest of the channel update fields

* Fully set up channel edit logging

* Add scheduled event logging

* Invite events and Role events

* Thread creates and deletes logging + updated kordex

* Log timeouts created by lily

* Fix timeout logging, yeehaw actual code is done now

* Add docs

* Fix package references

* Remove the logging, however funny it was to me it is not needed

* Complete merge

* Add configuration, split down into two event categories

* Update migrations for utility config

* Reduce code duplication and rename some packages

* Fix formatting of applied tags

* Reduce some duplication here and there

* Dm default false (#421)

* Theoretically make the DM option default to a certain value. Needs testing :)

* Forgot migration 😎

* Well, lets do this I guess

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: TheKodeToad <[email protected]>
Co-authored-by: Gareth Coles <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants