Open nikammerlaan opened 9 months ago
Now we can put catalog declaration in settings.gradle.kts
with for example:
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
version("kotlin", "1.9.22")
version("ktor", "2.3.9")
plugin("kt-multiplatform", "org.jetbrains.kotlin.multiplatform").versionRef("kotlin")
library("ktor-core", "io.ktor", "ktor-client-core").versionRef("ktor")
library("ktor-serialization", "io.ktor", "ktor-client-serialization").versionRef("ktor")
// optional
bundle(
"ktor",
listOf("ktor-core", "ktor-serialization")
)
}
}
}
And use that in build.gradle.kts
:
plugins {
alias(libs.plugins.kt.multiplatform)
}
// ...
kotlin {
sourceSets {
val commonMain by getting {
dependencies {
// individual
// api(libs.ktor.core)
// api(libs.ktor.serialization)
// or by bundle
api(libs.bundles.ktor)
}
}
}
Is there an existing issue for this?
Package ecosystem
Gradle
Package manager version
8.5
Language version
No response
Manifest location and content before the Dependabot update
/gradle/libs.versions.toml
dependabot.yml content
Updated dependency
N/A
What you expected to see, versus what you actually saw
This is a valid
libs.versions.toml
file for Gradle, but Dependabot is unable to parse it and errors. The file contains an old dependency, so I would expect it to create a PR to update it.Native package manager behavior
N/A
Images of the diff or a link to the PR, issue, or logs
Smallest manifest that reproduces the issue
A
libs.verisons.toml
file as simple as this will trigger the issue:This slightly different config is parsed without error:
The issue appears to be related to the specific ordering of declarations.
Here's a full repo that reproduces the issue.