This message was deleted.
# community-support
s
This message was deleted.
🙌 1
b
Copy code
versionCatalogs {
    create("deps") {

        version("compileSdk", "32")
        version("minSdk", "23")
        version("targetSdk", "32")

        plugin("androidLibrary", "com.android.library").version("7.2")
        plugin("androidKotlin", "org.jetbrains.kotlin.android").version("1.6.21")

        version("vAndroidGradle", "7.2.1")
        library("kotlinGradle", "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
        library("androidGradle", "com.android.tools.build", "gradle").versionRef("vAndroidGradle")
        library("androidGradleApi", "com.android.tools.build", "gradle-api").versionRef("vAndroidGradle")

        version("androidCore", "1.8.0")
        library("coreKtx", "androidx.core", "core-ktx").versionRef("androidCore")
        library("appCompat", "androidx.appcompat:appcompat:1.4.1")
        library("lifecycleRuntime", "androidx.lifecycle:lifecycle-runtime-ktx:2.4.1")
        bundle("androidCore", listOf("coreKtx"))

        version("vCompose", "1.2.0-beta03")
        library("composeRuntime", "androidx.compose.runtime", "runtime").versionRef("vCompose")
    }
}
Questions: 1. Why am I getting this error? 2. Is there a specific relationship between
version()
and
bundle()
aliases, or are they separate? I would expect that the aliased libraries can all have different version values and that a bundle isn't restricted to having only a single version value per bundle.
c
odd error. `listOf`should be resolve to stdlib - perhaps check the imports. A bundle, by definition, uses a single version applied to each entry in the bundle. that version can be different than versions used elsewhere.
hopefully that code is indeed Kotlin and not Groovy 😉
apologies, my statement was incorrect (mind stuck on previous BOM / catalog discussion). A bundle is simply a grouping of dependencies, using their versions as specified.
b
....
Thanks for #2, and I think I just face palmed number 1.
c
no worries, it all gets blurry sometimes…
b
Yep. It was a duh thing. I renamed every other script in the project to
.kts
... except
settings.gradle
.
Thank you!
👍 1