Conversation
- Use create("libs") with from(files(...)) instead of named("libraries")
so version() calls after from() properly override TOML-loaded entries
- Override the single "kotlin" version alias instead of nonexistent
per-library aliases — all libraries/plugins use version.ref = "kotlin"
- Add the same override to buildSrc/settings.gradle.kts since buildSrc
has its own independent version catalog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gradle auto-creates the libs catalog from gradle/libs.versions.toml. Using create() with from() caused a second from() call, which is not allowed. Use named() to access the existing catalog instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gradle 9's auto-created libs catalog cannot be modified via the versionCatalogs API (create causes duplicate from(), named causes not found). Use sed to patch libs.versions.toml before the build instead, which reliably handles both buildSrc and root project. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
alfonsoristorato
approved these changes
Feb 17, 2026
| @@ -19,6 +19,10 @@ dependencyResolutionManagement { | |||
| versionCatalogs { | |||
| create("libs") { | |||
Member
There was a problem hiding this comment.
when I did this in the examples repo I had to do this defaultLibrariesExtensionName.set("defaultLibs") to avoid conflicts and ensure proper override, I am now a bit confused as to how this worked straight away here - unless you have not yet run this job :)
Member
Author
There was a problem hiding this comment.
yeah I don't think its ran yet until its merged.
I'll add your line and merge.
Member
Author
There was a problem hiding this comment.
I think the difference might be that this is in build src settings and not the normal settings.?
Member
There was a problem hiding this comment.
let's merge it, I am sure it will be fine 😄
…otlin version override logic.
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.
Closes #5665