Open eygraber opened 1 year ago
It looks like the compose plugin no longer does the rewriting of the dependencies, and I can't find where it's actually happening. Any pointers?
It looks like the compose plugin no longer does the rewriting of the dependencies, and I can't find where it's actually happening. Any pointers?
https://github.com/JetBrains/compose-multiplatform/tree/master/gradle-plugins
It used to happen in https://github.com/JetBrains/compose-jb/blob/612fab6099aa93a6f6d440350c905d948b6f5999/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt#L85 but it doesn't look like there's anything in the plugin that does that anymore.
It looks like the compose plugin no longer does the rewriting of the dependencies
What version of Compose Multiplatform are you checked?
1.5.0-beta01
The behavior is still there, but what I meant was that there doesn't seem to be code in the plugin that does it anymore.
I'm using Jetbrains Compose in a lot of my libraries, but when I consume them in Android I want to use a version of Jetpack Compose that is newer than the ones that Jetbrains re-writes them to.
I've been using this snippet to do that:
Now that Jetpack Compose provides a BOM I'd like to use that instead of one version for all androidx compose artifacts (which may not work in the future since the versioning can be independent).
Since Jetbrains Compose rewrites the dependencies in the
group:name:version
format, it will not work with the BOM which expects the dependencies to be written in thegroup:name
format. I've borrowed a trick from the Jetbrains Compose plugin to achieve this:Would you be open to a PR that will natively support the BOM through the Jetbrains Compose plugin?
My thought is to add a flag to the AndroidExtension for setting a BOM version, and if it is present, the plugin will add a dependency to the BOM, and rewrite the androidx dependencies using
group:name
. An alternative is to have a boolean saying to rewrite the dependencies using thegroup:name
format, and let the consumer be responsible for adding the BOM dependency themselves.