MobileUI LogoMobileUI
/

Dependency Managment

Use MobileUI's bill of materials to manage common dependencies


Since version 0.5.1, MobileUI comes with a Bill Of Materials (BOM). This is a great a way to make your life easier by centralizing dependency versions in a single location. How can you profit from this?

Using the BOM with your MobileUI projects

To add the bill of materials to your MobileUI project, you add a single line of code in your app-common's build file as shown below. From then on, you can use dependencies mentioned in the BOM without concrete version. This applies for example to the Retrofit Plugin, where you have a choice of different optional dependencies that always fit together with this approach:

app-common/build.gradle
dependencies {
    api platform("io.nevernull:mobileui-platform:$mobileuiVersion")
    // Use managed dependencies without concrete version
    api "com.squareup.retrofit2:converter-jackson"    ...
}

Additionally, all MobileUI plugins are part of the BOM so that version information is not required when declaring the list of plugins used in your project:

[your-project-path]/build.gradle
allprojects {
    ext {
        ...
        mobileuiPlugins = [
                // MobileUI Plugin versions come from the BOM
                "io.nevernull:mobileui-inject",                "io.nevernull:mobileui-plugin-retrofit",                "io.nevernull:mobileui-plugin-i18n",                "io.nevernull:mobileui-plugin-vibrator",        ]
    }
}

Further Reading