# 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

transforms:
    - ac_taskgraph.transforms.build:transforms
    - taskgraph.transforms.code_review:transforms
    - taskgraph.transforms.job:transforms
    - taskgraph.transforms.task:transforms

kind-dependencies:
    - toolchain


job-defaults:
    attributes:
        build-type: regular
        code-review: true
        component: samples-browser
    description: Execute Gradle tasks for component "{component}"
    fetches:
        toolchain:
            - android-sdk-linux
            - android-gradle-dependencies
    include-coverage: true
    run:
        using: gradlew
        use-caches: false
    run-on-tasks-for: [github-pull-request, github-push]
    treeherder:
        kind: build
        platform: android-all/opt
        tier: 1
    worker-type: b-android
    worker:
        chain-of-trust: true
        docker-image: {in-tree: base}
        max-run-time: 1200

jobs:
    gecko:
        run:
            gradlew:
                - ':samples-browser:assembleGecko'
                - ':samples-browser:testGeckoDebugUnitTest'
                - ':samples-browser:lintGecko'
        treeherder:
            symbol: 'samples-browser(B)'

    system:
        run:
            gradlew: [':samples-browser:assembleSystem']
        treeherder:
            symbol: 'samples-browser-system(B)'
