I know that Composables can be used in xml layouts using androidx.compose.ui.platform.ComposeView.
But the problem is that the application should include gradle compose dependency androidx.compose.ui:ui to have access to ComposeView class.

The library which provides the Composable of course contains these dependencies. And furthermore, the library is provided to an app via maven repo, i.e. there I a .pom file with all transitive dependencies listed.
So how can I use a Composable from a maven library in an legacy app without having this app to include compose dependencies?