# 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: comparison

Language: en

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

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [Android](<https://devfeed.tech/topics/android.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [migration](<https://devfeed.tech/topics/migration.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>), [build](<https://devfeed.tech/tags/build.md>), [comparison](<https://devfeed.tech/tags/comparison.md>), [compose](<https://devfeed.tech/tags/compose.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [incremental](<https://devfeed.tech/tags/incremental.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [migration](<https://devfeed.tech/tags/migration.md>), [ui](<https://devfeed.tech/tags/ui.md>)

## AI overview

This article describes a controlled approach for evaluating how Jetpack Compose, Data Binding, View Binding, and plain View affect Android Gradle build performance. It defines independent, dependent, and control variables, and proposes using synthetic Android projects generated with Android Studio to make comparisons more consistent.

## 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