Skip to content

Superior language - #20

Open
GuavaDealer wants to merge 9 commits into
codingcat2468:masterfrom
GuavaDealer:master
Open

GuavaDealer wants to merge 9 commits into
codingcat2468:masterfrom
GuavaDealer:master

Conversation

@GuavaDealer

@GuavaDealer GuavaDealer commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

made with love & kotlin <3

- Migrate all Java sources across base, platform API, Paper, and Velocity modules to idiomatic Kotlin.
- Relocate subproject directories into src/ and update project paths in Gradle settings.
- Introduce buildSrc Kotlin DSL extensions, configure Java 25 toolchains, and enable Gradle feature previews.
- Modernize dependencies, Gradle wrapper, and version catalog declarations across all modules.
- Refactor platform API abstractions to eliminate legacy I-prefixed interface conventions in favor of idiomatic Kotlin contracts.
- Implement a Kotlin DSL for Brigadier commands with custom command node builders and player argument resolution.
- Overhaul dialog session management and packet handling, incorporating PacketEvents compatibility adjustments.
- Rewrite YAML changelog storage, configuration parsing, and localization resource loaders in Kotlin.
- Update Paper and Velocity platform adapters, player wrappers, and event dispatchers to align with revised platform contracts.

Signed-off-by: GuavaDealer (Idan Nehama) <GuavaDealer@gmail.com>
- Replace SnakeYAML with Kotaml and kotlinx.serialization for type-safe configuration and storage serialization.
- Integrate MCCoroutine across Paper and Velocity platforms, migrating plugin lifecycle handlers to suspending functions.
- Expose a plugin-bound coroutine scope on platform interfaces and add suspending command execution builders.
- Add suspending variants for storage operations and configuration reloads, offloading file I/O to Dispatchers.IO.
- Implement batch marking for read changelog entries to reduce disk writes when acknowledging multiple entries.
- Refactor player freeze state management from CompletableFuture to CompletableDeferred with suspending timeouts.
- Update dialog editor session commits, entry deletions, and reload commands to run asynchronously in coroutines.

Signed-off-by: GuavaDealer (Idan Nehama) <GuavaDealer@gmail.com>
- Implement relational database storage backend powered by JetBrains Exposed with support for SQLite, MySQL, MariaDB, PostgreSQL, and H2.
- Define dedicated relational tables for changelog entries and player-read receipts with cascading foreign key references.
- Support automatic migration of existing _data.yml changelog records into the database upon startup with backup preservation.
- Introduce database connection settings and credentials configuration with optional custom JDBC URL overrides in config.yml.
- Add synchronous and asynchronous configuration saving methods via Kotaml serialization.
- Update storage factory instantiation to resolve database engine identifiers and connect with configured credentials.
- Add JetBrains Exposed and SQLite JDBC dependencies to Gradle version catalog and build configurations.
- Add unit tests verifying database schema creation, entry operations, read tracking, and configuration parsing.
- Update project roadmap documentation to reflect completed JDBC database support.

Signed-off-by: GuavaDealer (Idan Nehama) <GuavaDealer@gmail.com>
- Add comprehensive unit test coverage across the base and platformapi modules covering events, commands, dialogs, storage, and configuration
- Integrate the Kotlinx Kover coverage plugin with a 75% verification rule for base and platformapi
- Update ResourceUtil to support directory file systems alongside JAR URIs to enable resource listing in test environments
- Make ServerChangelogs and PluginConfig testable with setter methods, dynamic API lookup, and safe fallback initialization
- Open ChangelogDialog class and expose dialog view helpers to facilitate UI testing
- Add required test dependencies including Brigadier, Adventure, PacketEvents, Netty buffer, and SLF4J to test source sets

Signed-off-by: GuavaDealer (Idan Nehama) <GuavaDealer@gmail.com>
# Conflicts:
#	.idea/.gitignore
#	.idea/gradle.xml
#	.idea/misc.xml
#	.idea/modules.xml
#	README.md
#	base/build.gradle.kts
#	base/src/main/java/com/codingcat/changelogs/base/data/ChangelogStorage.java
#	base/src/main/java/com/codingcat/changelogs/base/data/storage/YamlChangelogStorage.java
#	base/src/main/java/com/codingcat/changelogs/base/dialog/ui/ChangelogDialog.java
#	base/src/main/java/com/codingcat/changelogs/base/event/ChangelogJoinListener.java
Signed-off-by: GuavaDealer (Idan Nehama) <GuavaDealer@gmail.com>
…ration

- Set `changelog_storage` default to `sqlite` in `config.yml` for improved reliability and performance.
- Add JVM arguments and downloadable Modrinth plugins (`packetevents`, `luckperms`) to `build.gradle.kts` for Velocity and Paper, simplifying local testing.
- Adjust `@Subscribe` annotation to `PostOrder.LATE` in `VelocityChangelogsPlatform` for greater event handling accuracy during initialization.
- Suppress `VulnerableLibrariesLocal` warnings in build scripts to maintain clean Gradle builds.

Signed-off-by: GuavaDealer (Idan Nehama) <GuavaDealer@gmail.com>
- Add comprehensive KDoc documentation across core, platform API, Paper, Velocity, and build extension components.
- Standardize Kotlin member and scope references using explicit this and labeled this@... receivers.
- Adopt idiomatic Kotlin collection factories like hashSetOf in place of raw Java collection constructors.
- Reformat long expressions, JDBC connection URLs, method arguments, and comment blocks to conform to line length limits.
- Modernize default configuration and localization of YAML files with header banners, clean scalar formatting, and block scalars for multiline strings.
- Pin Paper API dependency to a fixed stable release rather than a dynamic build selector.

Signed-off-by: GuavaDealer (Idan Nehama) <GuavaDealer@gmail.com>
- Externalize author and contributor lists into Gradle properties and dynamically populate Paper and Velocity plugin manifests.
- Standardize the Paper plugin identifier to align with the Velocity module naming convention.
- Adopt safe Gradle property lookups with descriptive error handling for required build properties.
- Replace fully qualified class references with explicit imports in storage classes to improve code readability.

Signed-off-by: GuavaDealer (Idan Nehama) <GuavaDealer@gmail.com>
@codingcat2468 codingcat2468 added the i dont even know anymore exactly what it says label Oct 1, 2026
@codingcat2468 codingcat2468 self-assigned this Oct 1, 2026

@TiggerTakkyTTT TiggerTakkyTTT left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

kotlin

@QrackyDev QrackyDev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Kotaml should be replaced with Configurate, the library included with Paper (the API doesn't provide it, the Paperweight does, but it's always accessible at runtime). You could optionally then also add configurate-extra-kotlin, which is a extremely small library adding support for use of data classes.

@GuavaDealer

Copy link
Copy Markdown
Contributor Author

Kotaml should be replaced with Configurate, the library included with Paper (the API doesn't provide it, the Paperweight does, but it's always accessible at runtime). You could optionally then also add configurate-extra-kotlin, which is a extremely small library adding support for use of data classes.

I chose Kotaml primarily to leverage kotlinx.serialization. It provides a much cleaner, idiomatic Kotlin API with compile-time code generation for data classes, whereas Configurate tends to involve more boilerplate and reflection.

@ItsArtsign

Copy link
Copy Markdown

I agree with this statement

@QrackyDev QrackyDev left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Kotaml should be replaced with Configurate, the library included with Paper (the API doesn't provide it, the Paperweight does, but it's always accessible at runtime). You could optionally then also add configurate-extra-kotlin, which is a extremely small library adding support for use of data classes.

After discovering they actually don't even support comments - while they do return a CommentedConfigurationNode and bundle a @Comment annotation - I agree that Heapy/kotaml is the best choice, thus closing the review without requested changes.

@GuavaDealer

GuavaDealer commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

me while waiting
treehee

@iwalktoburgerking iwalktoburgerking left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

i walk to burger king

@SamTheDevDE SamTheDevDE left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

looks okay 👍 ❤️

@BagheadReturns BagheadReturns left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

acceptable 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i dont even know anymore exactly what it says

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants