# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
---
loader: taskgraph.loader.transform:loader

kind-dependencies:
    - build-apk
    - build-components
    - build-samples-browser
    - docker-image
    - external-gradle-dependencies
    - lint
    - test-apk
    - ui-test-apk

transforms:
    - taskgraph.transforms.code_review:transforms
    - android_taskgraph.transforms.chunk:transforms
    - android_taskgraph.transforms.complete:transforms
    - taskgraph.transforms.job:transforms
    - taskgraph.transforms.task:transforms

task-defaults:
    attributes:
        code-review: true
    worker-type: b-android
    worker:
        docker-image: {in-tree: base}
        max-run-time: 600
    requires: all-resolved
    run:
        command:
            task-reference:
                /builds/worker/checkouts/vcs/taskcluster/scripts/are_dependencies_completed.py <self>
        use-caches: false
        using: run-task
    notifications:
        by-geckoview-bump:
            nightly:
                subject: "[Android-Components] Failed to update geckoview nightly PR#{pull_request_number}"
                message: "Please check {repository}/pull/{pull_request_number}"
                emails:
                    - fenix-eng-notifications@mozilla.com
                    - geckoview-core@mozilla.com
            default: {}

tasks:
    pr:
        description: PR Summary Task
        run-on-tasks-for:
            - github-pull-request
            - github-pull-request-untrusted

    push:
        description: Push Summary Task
        run-on-tasks-for: [github-push]
