Repository navigation
feat(gradle)!: stop choosing the engine and drop the Kotlin plugin - #336
Merged
Merged
Conversation
The com.chunkzero.chunk plugin no longer adds multistom or multistom-kotlin; apps declare their engine dependency themselves. The com.chunkzero.chunk.kotlin plugin is removed: when the root project applies org.jetbrains.kotlin.jvm, the base plugin generates and compiles the coroutine backend facade, and Kotlin modules depend on it. World conversion moves to the engine-neutral world-converter module, which runs on the app's own Minestom or multistom. BREAKING CHANGE: apply org.jetbrains.kotlin.jvm instead of com.chunkzero.chunk.kotlin, and add com.chunkzero.chunk:multistom (or multistom-kotlin) to each app.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #335 (which is stacked on #334).
Summary
The Gradle plugin no longer picks an engine or configures Kotlin. Apps declare what they run on, and everything the plugin generates or runs is engine-neutral.
com.chunkzero.chunkstops addingmultistom/multistom-kotlin. Apps addcom.chunkzero.chunk:multistom(ormultistom-kotlin), or upstreamnet.minestom:minestomwithcom.chunkzero.chunk:minestom.com.chunkzero.chunk.kotlinis removed. When the root project appliesorg.jetbrains.kotlin.jvm, the base plugin generatesCoroutineBackendClient, compiles it in the reserved:chunk:backend-kotlinproject, and makes Kotlin modules depend on it. Java apps stay free of Kotlin (the root's ownkotlin-stdlibis excluded from its published variants).validateChunkJvmstill checks Kotlin compile targets against the toolchain, loading Kotlin types through the applied plugin's classloader. It works whether Kotlin is declared in settings withapply falseor applied with a version in the root build; both are covered by TestKit.com.chunkzero.chunk:world-convertermodule replaces multistom's internalAnvilConverter. The plugin resolves it at its own version and runs it on the app's runtime classpath, so it uses the app's own Minestom or multistom. Polar resolves consistently with the app's version.Engineadapter.testandmultistomTest).chunk createwrites root build files as templates. Java apps addmultistom, and Kotlin apps apply Kotlin themselves and addmultistom-kotlin, pinned to the CLI version.Breaking changes
id("com.chunkzero.chunk.kotlin")withid("org.jetbrains.kotlin.jvm")plusid("com.chunkzero.chunk"), in the root and in Kotlin modules.implementation("com.chunkzero.chunk:multistom:<version>")ormultistom-kotlin.Known limitations
kotlin-stdlib.Validation
./gradlew :jvm:runtime:test :jvm:multistom:test :jvm:multistom-kotlin:test :jvm:minestom:test :jvm:world-converter:check(the converter on both engines)jvm/gradle-plugintests, including both Kotlin setups and a Java app in a Kotlin buildcargo test -p chunk-cli creationexamples/{local,arena,load}testClassesscripts/check-consumers.py(fresh Java and Kotlinchunk createprojects, arena, local)just fmt-check🤖 Generated with Claude Code