diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000000..6bfc147a2fa --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,56 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. +# See: https://circleci.com/docs/configuration-reference +version: 2.1 + +# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects. +# See: https://circleci.com/docs/orb-intro/ +orbs: + # https://circleci.com/developer/orbs/orb/circleci/android + android: circleci/android@2.3.0 + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/configuration-reference/#jobs +jobs: + run-tests-without-build-cache: + # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/configuration-reference/#executor-job + executor: + name: android/android-machine + tag: 2023.11.1 + + # Add steps to the job + # See: https://circleci.com/docs/configuration-reference/#steps + steps: + - android/change-java-version: + java-version: 17 + - checkout + - run: + name: Checkout submodules as well + command: | + git "submodule" "update" "--init" "--recursive" "--jobs=10" + - run: + name: Bitrise Build Cache + command: | + #!/usr/bin/env bash + set -euxo pipefail + + # download Bitrise Build Cache CLI + curl -sSfL 'https://raw.githubusercontent.com/bitrise-io/bitrise-build-cache-cli/main/install/installer.sh' | sh -s -- -b /tmp/bin -d + + # run the CLI to enable Bitrise build cache for Gradle + /tmp/bin/bitrise-build-cache enable-for gradle + - run: + name: Add Build Cache dependency hashes + command: | + ./gradlew --write-verification-metadata sha256 + - run: + name: Lint PlayProdDebug + no_output_timeout: 60m + command: ./gradlew :Signal-Android:lintPlayProdDebug + +# Orchestrate jobs using workflows +# See: https://circleci.com/docs/configuration-reference/#workflows +workflows: + run-tests: + jobs: + - run-tests-without-build-cache diff --git a/gradle.properties b/gradle.properties index d7cb0fccbdc..dfee94a2f47 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -org.gradle.jvmargs=-Xmx6g -Xms256m -XX:MaxMetaspaceSize=1g +org.gradle.jvmargs=-Xmx4g -Xms256m -XX:MaxMetaspaceSize=1g android.useAndroidX=true android.enableJetifier=true kapt.incremental.apt=false