Hi why in convention plugin script we can't use ve...
# gradle
p
Hi why in convention plugin script we can't use version catalog ? example : I must put
Copy code
plugins {
    id("org.jetbrains.kotlin.multiplatform")
} Why we can't put that
Copy code
plugins {
    alias(libs.plugins.kotlinMultiplatform)
}
e
not Kotlin related but
the version catalog is belongs to the consuming project it isn't known at the time that the plugin is being built
b
this is how I use them: maybe not what you are looking for😅
Copy code
dependencies {
    val bom = libs.findLibrary("androidx.compose.bom").get()
    "implementation"(platform(bom))
    //3rd party minor
    "implementation"(libs.findLibrary("airbnb.android.lottie.compose").get())
and
Copy code
compileSdk = libs.findVersion("compileSdk").get().toString().toInt()
and
Copy code
apply(libs.findPlugin("compose-compiler").get().get().pluginId)
p
@Bekzod For dependencies it's ok but for plugins we can't use alias. We must make class that extends Plugin<Project> to use toml but with script we can't. So i made a class that extends Plugin<Project>