Install missing Android SDK components step for React Native

We released a new major version for Install missing Android SDK components step. The previous version had strong limitations and these limitations caused lots of issues, especially for React Native projects. Now they are gone! 🙌

We released a new major version for Install missing Android SDK components step. The previous version had strong limitations and these limitations caused lots of issues, especially for React Native projects. Now they are gone! 🙌

Earlier versions' process 🚶

Before version 2.0.0 the step:

  • First searched for the root build.gradle file.
  • In the same directory as the root build.gradle, it searched for a settings.gradle file to collect the active modules in the project.
  • Based on the collected module names it created the list of the module's build.gradle file paths.
  • Then it parsed the build.gradle files to detemine the required compileSdkVersion and buildToolsVersion and installed them.

The earlier versions' limitations 😖

The following strong limitations were caused by the fact that the step was using file parsing:

  • it was able to find the modules build.gradle file, only if it existed on the default path (REPOROOT/MODULENAME/build.gradle)
  • it was able to determine compileSdkVersion and buildToolsVersion only if they were directly specified (not with variables)
  • it was not able to follow a module's dependent modules to determine every required compileSdkVersion and buildToolsVersion

And to get rid of these limitations... ✂

In version 2.0.0 we dropped the file parsing solution and switched to using gradle commands to determine or install the required SDK components:

  • First, the step determines your project's Android Gradle Plugin version.
  • Then the step runs the gradle dependencies command.
  • If the Plugin version is 2.2.0 or later, the plugin will download and install the missing components during the Gradle command.
  • Otherwise the command will fail, and the step will then parse the command's output to determine which components are missing and installs them.

This way we let gradle to do the weight lifting,  and it is doing it quite well: the result is a more reliable version of the step.

Happy building!

Explore more topics

App Development

Learn how to optimize your mobile app deployment processes for iOS, Android, Flutter, ReactNative, and more

Bitrise & Community

Check out the latest from Bitrise and the community. Learn about the upcoming mobile events, employee spotlights, women in tech, and more

Mobile App Releases

Learn how to release faster, better apps on the App Store, Google Play Store, Huawei AppGallery, and other app stores

Mobile DevOps

Learn Mobile DevOps best practices such as DevOps for iOS, Android, and industry-specific DevOps tips for mobile engineers

Mobile Testing & Security

Learn how to optimize mobile testing and security — from automated security checks to robust mobile testing and more.

Product Updates

Check out the latest product updates from Bitrise — Build Insights updates, product news, and more.