tasks:
  - name: prepare tool
    script: .ci/scripts/prepare_tool.sh
    infra_step: true # Note infra steps failing prevents "always" from running.
  - name: download Dart and Android deps
    script: .ci/scripts/tool_runner.sh
    infra_step: true
    args: ["fetch-deps", "--android", "--supporting-target-platforms-only"]
  - name: build examples
    script: .ci/scripts/tool_runner.sh
    args: ["build-examples", "--apk"]
  - name: lint
    script: .ci/scripts/tool_runner.sh
    args: ["analyze", "--android", "--no-dart"]
  # Native unit and native integration are split into two steps to allow for
  # different exclusions.
  # TODO(stuartmorgan): Eliminate the native unit test exclusion, and combine
  # these steps.
  - name: native unit tests
    script: .ci/scripts/tool_runner.sh
    args: ["native-test", "--android", "--no-integration", "--exclude=script/configs/exclude_native_unit_android.yaml"]
  - name: native integration tests
    script: .ci/scripts/tool_runner.sh
    args: ["native-test", "--android", "--no-unit"]
  - name: drive examples
    script: .ci/scripts/tool_runner.sh
    args: ["drive-examples", "--android", "--exclude=script/configs/exclude_integration_android.yaml,script/configs/exclude_integration_android_emulator.yaml"]