Skip to content

bitrise-steplib/steps-install-missing-android-tools

Repository files navigation

Install missing Android SDK components

Step changelog

Install Android SDK components that are required for the app.

Description

This Step makes sure that required Android SDK components (platforms and build-tools) are installed. To do so, the Step runs the gradlew dependencies command.

If the Android Plugin for Gradle version is 2.2.0 or higher, the plugin will download and install the missing components during the Gradle command. Otherwise the command fails and the Step parses the command's output to determine which SDK components are missing and installs them.

Configuring the Step

  1. Set the path of the gradlew file.

    The default value is that of the $PROJECT_LOCATION Environment Variable.

  2. If you use an Android NDK in your app, set its revision in the NDK Revision input.

Troubleshooting

If the Step fails, check that your repo actually contains a gradlew file. Without the Gradle wrapper, this Step won't work.

Useful links

Installing an additional Android SDK package

Related Steps

🧩 Get started

Add this step directly to your workflow in the Bitrise Workflow Editor.

You can also run this step directly with Bitrise CLI.

⚙️ Configuration

Inputs
Key Description Flags Default
gradlew_path Using a Gradle Wrapper (gradlew) is required, as the wrapper is what makes sure that the right Gradle version is installed and used for the build. You can find more information about the Gradle Wrapper (gradlew), and about how you can generate one (if you would not have one already) in the official guide at: https://docs.gradle.org/current/userguide/gradle_wrapper.html. The path should be relative to the repository root, for example: ./gradlew, or if it's in a sub directory: ./sub/dir/gradlew. required $GRADLEW_PATH
ndk_version NDK version to install, for example 23.0.7599858. Run sdkmanager --list on your machine to see all available versions. Leave this input empty if you are not using the Native Development Kit in your project.
gradlew_dependencies_options Additional options to be added to the executed gradlew dependencies command. The step runs gradlew dependencies --stacktrace to list and install the missing project dependencies. Additional options will be appended to the end of this command. Example: --configuration-cache-problems=warn.
Outputs There are no outputs defined in this step

🙋 Contributing

We welcome pull requests and issues against this repository.

For pull requests, work on your changes in a forked repository and use the Bitrise CLI to run step tests locally.

Learn more about developing steps: