diff --git a/step.yml b/step.yml index 11c8e5b..a244257 100644 --- a/step.yml +++ b/step.yml @@ -1,6 +1,57 @@ title: Android Build -summary: Builds your Android project with gradle. -description: Builds your Android project with gradle. +summary: Builds your Android project with Gradle. +description: |- + + The Step builds your Android project on Bitrise with Gradle commands: it installs all dependences that are listed in the project's `build.gradle` file, and builds and exports either an APK or an AAB. + Once the file is exported, it is available for other Steps in your Workflow. + + You can select the module and the variant you want to use for the build. + + ### Configuring the Step + + 1. Make sure the **Project Location** input points to the root directory of your Android project. + 1. In the **Module** input, set the module that you want to build. + + You can find the available modules in Android Studio. + + 1. In the **Variant** input, set the variant that you want to build. + + You can find the available variants in Android Studio. + + 1. In the **Build type** input, select the file type you want to build. + + The options are: + - `apk` + - `aab` + + 1. In the **Options** input group, you can set more advanced configuration options for the Step: + + - In the **App artifact (.apk, .aab) location pattern** input, you can tell the Step where to look for the APK or AAB files in your project to export them. + For the vast majority of Android projects, the default values do NOT need to be changed. + + - In the **Additional Gradle Arguments**, you can add additional command line arguments to the Gradle task. Read more about [Gradle's Command Line Interface](https://docs.gradle.org/current/userguide/command_line_interface.html). + + - The **Set the level of cache** input allows you to set what will be cached during the build: everything, dependencies only, or nothing. + + ### Troubleshooting + + Be aware that an APK or AAB built by the Step is still unsigned: code signing is performed either in Gradle itself or by other Steps. To be able to deploy your APK or AAB to an online store, you need code signing. + + If you want to build a custom module or variant, always check that the value you set in the respective input is correct. A typo means your build will fail; if the module or variant does not exist in Android Studio, the build will fail. + + ### Useful links + + - [Getting started with Android apps](https://devcenter.bitrise.io/getting-started/getting-started-with-android-apps/) + - [Deploying Android apps](https://devcenter.bitrise.io/deploy/android-deploy/deploying-android-apps/) + - [Generating and deploying Android app bundles](https://devcenter.bitrise.io/deploy/android-deploy/generating-and-deploying-android-app-bundles/) + - [Gradle's Command Line Interface](https://docs.gradle.org/current/userguide/command_line_interface.html) + + ### Related Steps + + - [Gradle Runner](https://www.bitrise.io/integrations/steps/gradle-runner) + - [Android Sign](https://www.bitrise.io/integrations/steps/sign-apk) + - [Install missing Android SDK components](https://www.bitrise.io/integrations/steps/install-missing-android-tools) + website: https://github.com/bitrise-steplib/bitrise-step-android-build source_code_url: https://github.com/bitrise-steplib/bitrise-step-android-build support_url: https://github.com/bitrise-steplib/bitrise-step-android-build/issues @@ -27,24 +78,24 @@ inputs: - project_location: $BITRISE_SOURCE_DIR opts: title: Project Location - summary: "The root directory of your android project, for example, where your root build gradle file exist (also gradlew, settings.gradle, etc...)" - description: "The root directory of your android project, for example, where your root build gradle file exist (also gradlew, settings.gradle, etc...)" + summary: "The root directory of your Android project." + description: "The root directory of your Android project. For example, where your root build gradle file exist (also gradlew, settings.gradle, and so on)" is_required: true - module: "" opts: title: Module summary: | - Set the module that you want to build. To see your available modules please open your project in Android Studio and go in [Project Structure] and see the list on the left. + Set the module that you want to build. To see your available modules, please open your project in Android Studio and go in [Project Structure] and see the list on the left. description: | - Set the module that you want to build. To see your available modules please open your project in Android Studio and go in [Project Structure] and see the list on the left. + Set the module that you want to build. To see your available modules, please open your project in Android Studio and go in [Project Structure] and see the list on the left. is_required: false - variant: "" opts: title: Variant summary: | - Set the variant(s) that you want to build. To see your available variants please open your project in Android Studio and go in [Project Structure] -> variants section. + Set the variant(s) that you want to build. To see your available variants, please open your project in Android Studio and go in [Project Structure] -> variants section. description: | - Set the variant(s) that you want to build. To see your available variants please open your project in Android Studio and go in [Project Structure] -> variants section. + Set the variant(s) that you want to build. To see your available variants, please open your project in Android Studio and go in [Project Structure] -> variants section. You can set multiple variants separated by `\n` character. For instance: `- variant: myvariant1\nmyvariant2`. is_required: false - build_type: apk @@ -64,22 +115,21 @@ inputs: opts: category: Options title: App artifact (.apk, .aab) location pattern - summary: Will find the APK or AAB files - `depending on the build type input` - with the given pattern. + summary: Will find the APK or AAB files - depending on the **Build type** input - with the given pattern. description: | - Will find the APK or AAB files - `depending on the build type input` - with the given pattern.
- Separate patters with a newline. - + Will find the APK or AAB files - depending on the **Build type** input - with the given pattern.
+ Separate patterns with a newline. **Note**
- The step will export only the selected artifact type - `build type` - even if the filter would accept other artifact types as well. + The Step will export only the selected artifact type even if the filter would accept other artifact types as well. is_required: true - cache_level: "only_deps" opts: category: Options title: Set the level of cache description: |- - `all` - will cache build cache and dependencies - `only_deps` - will cache dependencies only - `none` - will not cache anything + `all` - The Step will cache build cache and the dependencies + `only_deps` - The Step will cache dependencies only + `none` - The Step will not cache anything is_required: true value_options: - "all" @@ -99,7 +149,6 @@ inputs: summary: This input is **DEPRECATED** - use the App location pattern input instead description: | This input is **DEPRECATED** - use the App location pattern input instead - Will find the APK files with the given pattern. outputs: