Make Kotlin subject to Dependabot updates - #444
Merged
Conversation
The `kotlin` version was not referenced by any catalog entry, so Dependabot could not resolve its coordinates and never proposed an update. The existing ignore rules pointed at catalog aliases, which do not match either. Reference the version from the Kotlin entries and from the Gradle plugin, and move the `KOTLIN_VERSION` override into the catalog so that the declarations in build.gradle.kts stay plain. As with Jackson, only patch updates are accepted and minor/major updates are applied explicitly. kotlin-stdlib is no longer declared explicitly, following the official Kotlin libraries, which leave it to the Kotlin Gradle Plugin. This changes its scope in the published POM from `runtime` to `compile`, which matches those libraries. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Problem
[versions] kotlinwas not referenced by any catalog entry, so Dependabot could not resolve its coordinates and has never proposed an update for it. The existing ignore rules pointed at catalog aliases (kotlin,kotlin-metadata-jvm), which do not match Dependabot's dependency names either. Kotlin was not "ignored" — it was never detected in the first place.Changes
versions.kotlinfrom the Kotlin library entries and add the Kotlin Gradle Plugin to[plugins], so that a single alias drives every Kotlin artifact.KOTLIN_VERSIONoverride into the version catalog (settings.gradle.kts). Addingversion.refbreaks the previous"${libs.kotlin.stdlib.get()}:${kotlinVersion}"form, and overriding the alias keeps the declarations inbuild.gradle.ktsplain.kotlin-stdlibexplicitly, following the official Kotlin libraries.About kotlin-stdlib
kotlinx-coroutines,kotlinx-serialization,kotlinx-datetime,kotlinx-ioandkotlinx.collections.immutabledeclare nokotlin-stdlibdependency and set nokotlin.stdlib.default.dependency; they leave it to the Kotlin Gradle Plugin. Their published POMs, along with those ofkotlin-metadata-jvmandkotlin-reflect, all carrykotlin-stdlibatcompilescope.This project declared it explicitly via
implementation, which published it atruntimescope. Removing the declaration aligns both the build script and the published POM with those libraries.This changes the published artifact:
kotlin-stdlibmoves fromruntimetocompilescope.Verification
./gradlew clean lintKotlin testKOTLIN_VERSION=2.3.21 ./gradlew test2.2.21/2.4.20-Beta1)2.1.21/2.2.21/2.4.20-Beta1kotlin-stdlib2.1.21/compileKOTLIN_VERSION=2.3.21)kotlin-stdlib2.3.21/compilekotlin-stdlib,kotlin-metadata-jvm,kotlin-reflectandkotlin-gradle-pluginall publish the same 2.1.x version set (2.1.0 2.1.10 2.1.20 2.1.21), so sharing a singleversion.refcannot produce an unresolvable combination.Note
The minimum Kotlin version in
test-main.ymlis still hardcoded as2.1.21, so it needs to be kept in sync manually if Dependabot bumps[versions] kotlin.🤖 Generated with Claude Code