FlowBinding icon indicating copy to clipboard operation
FlowBinding copied to clipboard

Publish platform for easier consumption

Open trevjonez opened this issue 5 years ago • 2 comments

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

trevjonez avatar Jul 29 '20 16:07 trevjonez

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?

ychescale9 avatar Jul 29 '20 17:07 ychescale9

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")
}

trevjonez avatar Dec 24 '20 19:12 trevjonez