# 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/.
---
task-defaults:
    description: 'Run detekt over all modules'
    run:
        using: gradlew
        gradlew: ['detekt', 'githubLintDetektDetails']
    worker:
        artifacts:
            - name: public/github
              path: /builds/worker/github
              type: directory


detekt-android-components:
    optimization:
        skip-unless-changed:
            - "android-components/**"
    run:
        pre-gradlew:
            - ["cd", "android-components"]
    treeherder:
        symbol: detekt(AC)
    worker:
        artifacts:
            - name: public/reports
              path: /builds/worker/checkouts/vcs/android-components/build/reports
              type: directory

detekt-focus:
    optimization:
        skip-unless-changed:
            - "focus-android/**"
    run:
        pre-gradlew:
            - ["cd", "focus-android"]
    treeherder:
        symbol: detekt(focus)
    worker:
        artifacts:
            - name: public/reports
              path: /builds/worker/checkouts/vcs/focus-android/build/reports
              type: directory

detekt-fenix:
    dependencies:
        external-gradle-dependencies: external-gradle-dependencies-lint-fenix
    optimization:
        skip-unless-changed:
            - "fenix/**"
    run:
        pre-gradlew:
            - ["cd", "fenix"]
        gradlew: [detekt, githubLintDetektDetails, 'mozilla-detekt-rules:test']
    treeherder:
        symbol: detekt(fenix)
    worker:
        artifacts:
            - name: public/reports
              path: /builds/worker/checkouts/vcs/fenix/build/reports
              type: directory
