diff --git a/step.yml b/step.yml index 4cf5573..e8185d4 100644 --- a/step.yml +++ b/step.yml @@ -1,9 +1,53 @@ title: Gradle Runner summary: |- - Runs the specified gradle task. + Runs a specified Gradle task. description: |- - Runs the specified gradle task and copies the generated APK and AAB files into - the Bitrise Deploy Directory (`$BITRISE_DEPLOY_DIR`). + The Step runs the specified Gradle task and copies the generated APK and AAB files into + the Bitrise Deploy Directory (`$BITRISE_DEPLOY_DIR`). It is capable of doing everything that you can do with Gradle on your own machine. + + ### Configuring the Step + + To use this Step, you need at least two things: + + * [Gradle Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html). + * A Gradle task that is correctly configured in your Gradle project. + + The Step can run the specified task with the Gradle Wrapper. For the basic configuration: + + 1. Open the **Config** input group. + 1. In the **Gradle task to run** input, add the task you want to run. Without an existing, valid task, the Step will fail. + 1. Set the `gradlew` file path: this is the path where the Gradle Wrapper lives in your project. The path should be relative to the project's root. + 1. Optionally, you can set a `build.gradle` file for the Step in the **Optional path to the gradle build file to use** input. + + To configure exporting an APK or AAB file generated by the Step: + + 1. Open the **Export config** input group. + 1. Filter the files you want the Step to export. You can filter: + * APK and AAB files. + * Test APK files. + * Mapping files. + Both exclude and include filters can be used. Each filter option can take multiple patterns, with each pattern on its own line in the input field. + + ### Troubleshooting + + If the Step keeps failing because it can't download the dependencies, check the `repositories` section in your `build.gradle` file. + It's possible that one or more of the services listed there are down so we Bitrise can't connect to them to download the dependencies you need. + + If you use a `build.gradle` file and get the error `Issue with input: GradleFile does not exist`, check the **Optional path to the gradle build file to use** input. + Remember, the path must be relative to the root of the repository. + + ### Useful links + + * [Gradle Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html) + * [Caching Gradle](https://devcenter.bitrise.io/builds/caching/caching-gradle/) + * [Gradle Runner vs Android Build](https://devcenter.bitrise.io/tips-and-tricks/android-tips-and-tricks/#gradle-runner-vs-android-build) + + ### Related Steps + + * [Generate Gradle Wrapper](https://www.bitrise.io/integrations/steps/generate-gradle-wrapper) + * [Gradle Unit Test](https://www.bitrise.io/integrations/steps/gradle-unit-test) + * [Android Build](https://www.bitrise.io/integrations/steps/android-build) + website: https://github.com/bitrise-io/steps-gradle-runner source_code_url: https://github.com/bitrise-io/steps-gradle-runner support_url: https://github.com/bitrise-io/steps-gradle-runner/issues @@ -26,16 +70,15 @@ inputs: - gradle_file: $GRADLE_BUILD_FILE_PATH opts: category: Config - title: Optional path to the gradle build file to use + title: Optional path to the Gradle build file to use description: | - Optional path to the gradle build file to use + Optional path to the Gradle build file to use. It should be relative to the root of the project. - gradle_task: assemble opts: category: Config title: Gradle task to run description: | Gradle task to run. - You can call `gradle tasks` or `gradle tasks --all` in your Gradle project directory to get the list of available tasks. is_required: true @@ -46,12 +89,10 @@ inputs: description: | Using a Gradle Wrapper (gradlew) is required, as the wrapper ensures 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 in the official guide at: [https://docs.gradle.org/current/userguide/gradle_wrapper.html](https://docs.gradle.org/current/userguide/gradle_wrapper.html). - - **The path should be relative** to the repository root. For example, `./gradlew`, + The path should be relative to the repository root. For example, `./gradlew`, or if it is in a sub directory, `./sub/dir/gradlew`. is_required: true - app_file_include_filter: | @@ -61,21 +102,15 @@ inputs: category: Export Config title: "APK and AAB file include filter" description: | - The step will copy the generated APK and AAB files that match this filter into the Bitrise Deploy Directory. - + The Step will copy the generated APK and AAB files that match this filter into the Bitrise deploy directory. Seperate patterns with a newline. - Example: - Copy every APK and AAB file: - ``` *.apk *.aab ``` - Copy every APK file with a filename that contains `release`, like (`./app/build/outputs/apk/app-release-unsigned.apk`): - ``` *release*.apk ``` @@ -86,23 +121,16 @@ inputs: category: Export Config title: "APK and AAB file exclude filter" description: | - One filter per line. The step will **not** copy the generated APK and AAB files that match this filters into the Bitrise Deploy Directory. - You can use this filter to avoid moving unalinged and/or unsigned APK and AAB files. - + One filter per line. The Step will NOT copy the generated APK and AAB files that match these filters into the Bitrise deploy directory. + You can use this filter to avoid moving unaligned and/or unsigned APK and AAB files. If you specify an empty filter, every APK and AAB file (selected by `APK and AAB file include filter`) will be copied. - Seperate patterns with a newline. - Examples: - Do not copy APK files with a filename that contains `unaligned`: - ``` *unaligned*.apk ``` - Do not copy APK files with a filename that contains `unaligned` and/or `Test`: - ``` *unaligned*.apk *Test*.apk @@ -112,7 +140,7 @@ inputs: category: Export Config title: "Test APK file include filter" description: | - The step will copy the generated apk files that match this filter into the Bitrise Deploy Directory. + The Step will copy the generated apk files that match this filter into the Bitrise deploy directory. Example: Copy every APK if its filename contains Test, like (./app/build/outputs/apk/app-debug-androidTest-unaligned.apk): @@ -125,15 +153,11 @@ inputs: category: Export Config title: "Test APK file exclude filter" description: | - One filter per line. The step will **not** copy the generated apk files that match this filters into the Bitrise Deploy Directory. + One filter per line. The Step will NOT copy the generated apk files that match this filters into the Bitrise deploy directory. You can use this filter to avoid moving unalinged and/or unsigned apk files. - If you specify an empty filter, every APK file (selected by `apk_file_include_filter`) will be copied. - Example: - Do not copy the test APK file if its filename contains `unaligned`: - ``` *unaligned*.apk ``` @@ -142,14 +166,11 @@ inputs: category: Export Config title: "Mapping file include filter" description: | - The step will copy the generated mapping files that match this filter into the Bitrise Deploy Directory. - + The Step will copy the generated mapping files that match this filter into the Bitrise deploy directory. If you specify an empty filter, no mapping files will be copied. - Example: Copy every mapping.txt file: - ``` *mapping.txt ``` @@ -158,15 +179,12 @@ inputs: category: Export Config title: "Mapping file exclude filter" description: | - The step will **not** copy the generated mapping files that match this filter into the Bitrise Deploy Directory. - You can use this step to avoid moving beta mapping file. - - If you specify an empty filter, every mapping files (selected by `mapping_file_include_filter`) will be copied. - + The Step will **not** copy the generated mapping files that match this filter into the Bitrise deploy directory. + You can use this input to avoid moving a beta mapping file, for example. + If you specify an empty filter, every mapping file (selected by `mapping_file_include_filter`) will be copied. Example: Do not copy any mapping.txt file that is in a `beta` directoy: - ``` */beta/mapping.txt ``` @@ -189,10 +207,8 @@ inputs: title: Additional options for Gradle call description: |- Options added to the end of the Gradle call. - You can use multiple options, separated by a space character. Example: `--stacktrace --debug` - If `--debug` or `-d` options are set then only the last 20 lines of the raw gradle output will be visible in the build log. The full raw output will be exported to the $BITRISE_GRADLE_RAW_RESULT_TEXT_PATH variable and will be added as an artifact. - retry_on_failure: "yes" @@ -209,21 +225,14 @@ inputs: title: "APK file include filter" description: | This input is **DEPRECATED** - use the `APK and AAB file include filter` input instead and set this input to empty value. - The step will copy the generated APK files that match this filter into the Bitrise Deploy Directory. - If you specify an empty filter, the new input "APK and AAB file include filter" will be used. - Example: - Copy every APK file: - ``` "*.apk" ``` - Copy every APK file with a filename that contains `release`, like (`./app/build/outputs/apk/app-release-unsigned.apk`): - ``` *release*.apk ``` @@ -233,22 +242,15 @@ inputs: title: "APK file exclude filter" description: | This input is **DEPRECATED** - use the `APK and AAB file exclude filter` input instead and set this input to empty value. - One filter per line. The step will **not** copy the generated APK files that match this filters into the Bitrise Deploy Directory. You can use this filter to avoid moving unalinged and/or unsigned apk files. - If you specify an empty filter, the new input "APK and AAB file exclude filter" will be used. - Examples: - Do not copy APK files with a filename that contains `unaligned`: - ``` *unaligned*.apk ``` - Do not copy APK files with a filename that contains `unaligned` and/or `Test`: - ``` *unaligned*.apk *Test*.apk @@ -261,7 +263,6 @@ outputs: description: |- This output will include the path of the generated APK file, after filtering based on the filter inputs. - If the build generates more than one APK file which fulfills the filter inputs this output will contain the last one's path. - BITRISE_AAB_PATH: @@ -271,7 +272,6 @@ outputs: description: |- This output will include the path of the generated AAB file, after filtering based on the filter inputs. - If the build generates more than one AAB file which fulfills the filter inputs this output will contain the last one's path. - BITRISE_TEST_APK_PATH: @@ -281,7 +281,6 @@ outputs: description: |- This output will include the path of the generated test APK file, after filtering based on the filter inputs. - If the build generates more than one APK file which fulfills the filter inputs this output will contain the last one's path. - BITRISE_APK_PATH_LIST: @@ -291,7 +290,6 @@ outputs: description: |- This output will include the paths of the generated APK files, after filtering based on the filter inputs. - The paths are separated with `|` character, eg: `app-armeabi-v7a-debug.apk|app-mips-debug.apk|app-x86-debug.apk` - BITRISE_AAB_PATH_LIST: opts: @@ -300,7 +298,6 @@ outputs: description: |- This output will include the paths of the generated AAB files, after filtering based on the filter inputs. - The paths are separated with `|` character, eg: `app.aab|app2.aab` - BITRISE_MAPPING_PATH: opts: @@ -308,5 +305,4 @@ outputs: summary: "Path of the generated (and copied) mapping.txt." description: |- This output will include the path of the generated mapping.txt. - If more than one mapping.txt exist in project this output will contain the last one's path.