Hi , in all the Compoe multiplatform samples I am ...
# compose
a
Hi , in all the Compoe multiplatform samples I am seeing the dependencies added like this :
Copy code
val commonMain by getting {
            dependencies {
                api(compose.runtime)
                api(compose.foundation)
                api(compose.material)
            }
        }
where is this compose.runtime defined ? I cannot find it in toml file . Is it provided via the jetbrains compose gradle plugin ? If so then how does it know which version of compose to pick up.
s
Yeah that looks like it comes from the Jetbrains compose Gradle plugin. And it picks up I suppose the latest available at the moment of that Gradle plugin release that works together with everything else. Kinda like using a bom in a way.
a
Cool , is this all documented anywhere ?
s
I am not aware of any place which does that. You could probably look at the source code of the Gradle plugin yourself to see what they do tbh
i
it comes from the Jetbrains compose Gradle plugin
true
And it picks up I suppose the latest available at the moment of that Gradle plugin release
Not exactly - the new plugin is published for each version so version of plugin is equal to Compose Multiplatform version
Kinda like using a bom in a way
kinda
a
So it is not possible to use whichever version of compose you want with jetbrains Compose plugin ?
i
this plugin IS a part of compose. Why do you need to split version of library and version of plugin?
a
Because I am adding compose multiplatform to a project which is already using compose , and I only want compose multiplatform in couple of modules where as pure android compose in 100 other modules which are on a certain version of compose . I dont want to go and change the compose versions for all those libraries but without changing there will be version mismatch
i
I don't see how it's related. For multiplatfrom modules you need to multiplatform gradle/compiler plugin. If you need specific version use specific version of the plugin
a
Ya I guess I have to use a specific version of gradle plugin and not just the latest blindly
👌 1