image: circleci/android:api-29

variables:
  GIT_SUBMODULE_STRATEGY: recursive

cache:
  key: ${CI_PROJECT_ID}
  paths:
    - ~/.m2/
    - ~/.gradle/
    - .gradle/

stages:
  - build

debug:
  stage: build
  script:
    - ./gradlew assembleDebug
    - ./gradlew --console=plain testBrdDebugUnitTest
    - ./gradlew --console=plain detekt
    # - ./gradlew -Pci --console=plain :app:lintBrdDebug -PbuildDir=lint
  only:
    - develop
    - master
    - /^release.*$/
    - merge_requests
  artifacts:
    paths:
      - app/build/outputs/
      - app/build/test-results
      - app/lint/reports/
      - app/build/reports/detekt

release:
  stage: build
  script:
    - ./gradlew assembleRelease
    - ./gradlew --console=plain testBrdReleaseUnitTest
    - ./gradlew --console=plain detekt
    # - ./gradlew -Pci --console=plain :app:lintBrdRelease -PbuildDir=lint
  only:
    - develop
    - master
    - /^release.*$/
  artifacts:
    paths:
      - app/build/outputs/
      - app/build/test-results
      - app/lint/reports/
      - app/build/reports/detekt

image: circleci/android:api-29

variables:
  GIT_SUBMODULE_STRATEGY: recursive

cache:
  key: ${CI_PROJECT_ID}
  paths:
    - /home/circleci/.m2/
    - /home/circleci/.gradle/
    - .gradle/

stages:
  - build

debug:
  stage: build
  script:
    - ./gradlew assembleDebug
    - ./gradlew --console=plain testBrdDebugUnitTest
    - ./gradlew --console=plain detekt
    # - ./gradlew -Pci --console=plain :app:lintBrdDebug -PbuildDir=lint
  only:
    - develop
    - master
    - /^release.*$/
    - merge_requests
  artifacts:
    paths:
      - app/build/outputs/
      - app/build/test-results
      - app/lint/reports/
      - app/build/reports/detekt

release:
  stage: build
  script:
    - ./gradlew assembleRelease
    - ./gradlew --console=plain testBrdReleaseUnitTest
    - ./gradlew --console=plain detekt
    # - ./gradlew -Pci --console=plain :app:lintBrdRelease -PbuildDir=lint
  only:
    - develop
    - master
    - /^release.*$/
  artifacts:
    paths:
      - app/build/outputs/
      - app/build/test-results
      - app/lint/reports/
      - app/build/reports/detekt

Use full path for ci cache paths
Use full path for ci cache paths
