# Fairly evaluating the impact of different Android UI libraries on Gradle build

DevFeed: [Fairly evaluating the impact of different Android UI libraries on Gradle build](<https://devfeed.tech/articles/fairly-evaluating-the-impact-of-different-android-ui-libraries-on-gradle-build-25905.md>)

Original publisher: [Read original article](<https://chao2zhang.medium.com/fairly-evaluating-the-impact-of-different-android-ui-libraries-on-gradle-build-6301de5e0e60?source=rss-d19045640fe------2>)

Author: Chao Zhang

Published: 2021-11-09T16:24:37Z

Content type: article

Language: en

Sources: [Chao Zhang](<https://devfeed.tech/sources/stories-by-chao-zhang-on-medium.md>)

Topics: [build times](<https://devfeed.tech/topics/build-times.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>), [Android Gradle Plugin](<https://devfeed.tech/topics/android-gradle-plugin.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-gradle-plugin](<https://devfeed.tech/tags/android-gradle-plugin.md>), [application](<https://devfeed.tech/tags/application.md>), [build](<https://devfeed.tech/tags/build.md>), [choice](<https://devfeed.tech/tags/choice.md>), [commit](<https://devfeed.tech/tags/commit.md>), [commits](<https://devfeed.tech/tags/commits.md>), [comparison](<https://devfeed.tech/tags/comparison.md>), [compose](<https://devfeed.tech/tags/compose.md>), [control](<https://devfeed.tech/tags/control.md>), [data](<https://devfeed.tech/tags/data.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [developer](<https://devfeed.tech/tags/developer.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [ergonomics](<https://devfeed.tech/tags/ergonomics.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [impact](<https://devfeed.tech/tags/impact.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [ui](<https://devfeed.tech/tags/ui.md>)

## AI overview

The excerpt proposes controlling for project and tooling differences when comparing Jetpack Compose, Data Binding, View Binding, and plain Views' effects on Gradle builds. It treats UI library choice as the independent variable and build measures such as clean and incremental build time and task timelines as outcomes. To keep comparisons fair, it recommends holding machine specifications, Gradle and Android Gradle Plugin versions, module dependencies, and UI appearance constant. Since production migrations often span commits alongside dependency and module changes, the article suggests using Android Studio poet to generate synthetic projects with configurable tooling, module structure, and code complexity. The excerpt provides setup rationale but no comparative build results.

## Source excerpt

Photo: Tsvetoslav Hristov from Unsplash For an Android application maintained by a large group of developers, build time is one of the most critical developer ergonomic metrics. This is particularly true when we evaluate to adopt new technology. Jetpack Compose is the new exciting modern UI library to build Android applications. Its official documentation already covers developer ergonomics on two of their sample applications. Although the comparison narrated in Jetpack Compose: Before and after were valuable, we would like to apply scientific control to our experiments, in order to fairly evaluate Compose against the existing UI layer technologies, such as Data Binding and View Binding. Fairness In a scientific experiment study, we use variables to test our hypothesis. There are basically three groups of variables: Independent variable as the input of our evaluation. Since we are evaluating the different Android UI libraries in this study, the particular type of UI library becomes our independent variable. Namely, Jetpack Compose, Data Binding, View Binding, and plain View. Dependent variable as the output of our evaluation. We would like to see how the choice of UI library impacts Gradle build, so the dependent variable could be any metric from our Gradle build. For instance, clean build time, incremental build time, and the timeline of the task execution. Control variable as the constants in our evaluation. We want to ensure the comparison to be performed with the same context. This means we need to ensure the same machine spec, same Gradle version, same Android Gradle Plugin version, same module dependencies, and same UI appearance. However, for large-scale applications, we are very unlikely to complete the full UI layer migration with a single atomic commit. Oftentimes, we are doing migrations over multiple commits spread over a time span, mixed with other commits to upgrading dependencies and altering module structures. With multiple commits, we become less co