ReactiveCircus / FlowBinding

Kotlin Coroutines Flow binding APIs for Android's platform and unbundled UI widgets, inspired by RxBinding.
https://reactivecircus.github.io/FlowBinding/
Apache License 2.0
901 stars 42 forks source link

Publish platform for easier consumption #102

Open trevjonez opened 4 years ago

trevjonez commented 4 years ago

I think this project would be a good candidate for publishing a platform BOM to make consumption easier when pulling multiple packages.

https://docs.gradle.org/current/userguide/java_platform_plugin.html#sec:java_platform_publishing

ychescale9 commented 4 years ago

Thanks and yes this is in my backlog 😃 . One thing I'm not quite sure is if it still offers benefits if we're are already managing all the dependencies in a single place e.g. in buildSrc/dependencies.kt? How would the configurations look like in a typical multi-module Android project?

trevjonez commented 3 years ago

precompiled script helpers is one popular way to do it, though not how I choose to. I try to rely on gradle provided functionality wherever possible rather than reinvent yet another way of handling things.

consumption in my mind would be roughly:

// Root build.gradle.kts
allProjects {
  dependencies {
    val flowBindingVersion: String by project // From root gradle.properties
    api(platform("io.github.reactivecircus.flowbinding:flowbinding-bom:$flowBindingVersion"))
  }
}

any place else using the libraries:

dependencies {
  api("io.github.reactivecircus.flowbinding:flowbinding-activity")
}