icon

Gradle Runner

Runs a specified Gradle task.

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.
  • 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.
  2. In the Gradle task to run input, add the task you want to run. Without an existing, valid task, the Step will fail.
  3. 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.

To configure exporting an APK or AAB file generated by the Step:

  1. Open the Export config input group.
  2. 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

Related Steps

Similar steps

Runs Jasmine tests.

Run your Jasmine tests with the Karma tool on Bitrise.

Build your XCTest or XCUITest runner to upload to remote testing service

Activates Bitrise Remote Build Cache add-on for subsequent Gradle builds in the workflow