From 437b0fe17af6edd19455834382de00949ce50544 Mon Sep 17 00:00:00 2001 From: Ali Kabiri Date: Sun, 20 Jul 2025 07:27:58 +0200 Subject: [PATCH 01/10] ci:run distribute-internal-testing only after successful tests --- .circleci/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b84cfb9..f69600c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -108,4 +108,7 @@ workflows: - android-test: context: SonarCloud - distribute-dev - - distribute-internal-testing + - distribute-internal-testing: + requires: + - android-test + From 2840e0718051cd582e73720bc42a963df1e64c42 Mon Sep 17 00:00:00 2001 From: Ali Kabiri Date: Sun, 20 Jul 2025 07:39:41 +0200 Subject: [PATCH 02/10] ci:make android_setup reusable --- .circleci/config.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f69600c..2deddb6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,7 @@ commands: key: v1-gradle-wrapper-{{ arch }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }} - restore_cache: key: v1-gradle-cache-{{ arch }}-{{ checksum "build.gradle.kts" }}-{{ checksum "settings.gradle.kts" }}-{{ checksum "gradle.properties" }}-{{ checksum "app/build.gradle.kts" }}-{{ checksum "gradle/libs.versions.toml" }} + restore_bundler_cache: steps: - restore_cache: @@ -25,6 +26,7 @@ commands: paths: - ~/.gradle/caches key: v1-gradle-cache-{{ arch }}-{{ checksum "build.gradle.kts" }}-{{ checksum "settings.gradle.kts" }}-{{ checksum "gradle.properties" }}-{{ checksum "app/build.gradle.kts" }}-{{ checksum "gradle/libs.versions.toml" }} + save_bundler_cache: steps: - save_cache: @@ -32,6 +34,14 @@ commands: - vendor/bundle key: v1-bundler-cache-{{ checksum "Gemfile.lock" }} + setup_android: + steps: + - checkout + - restore_gradle_cache + - restore_bundler_cache + - ruby/install-deps: + with-cache: true + executors: android-machine: machine: @@ -45,11 +55,7 @@ jobs: executor: android-machine resource_class: large steps: - - checkout - - restore_gradle_cache - - restore_bundler_cache - - ruby/install-deps: - with-cache: true + - setup_android - run: name: Fastlane - run all tests with coverage report command: | From 468bb3bcefe49ead12e9162008842e4aab0ea7c8 Mon Sep 17 00:00:00 2001 From: Ali Kabiri Date: Sun, 20 Jul 2025 07:43:34 +0200 Subject: [PATCH 03/10] ci:remove unncessary lint lane and use the gradlew command directly --- .circleci/config.yml | 4 ++-- fastlane/Fastfile | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2deddb6..43f4103 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -60,12 +60,12 @@ jobs: name: Fastlane - run all tests with coverage report command: | bundle exec fastlane testDev - bundle exec fastlane lint + - run: ./gradlew lintDebug - save_gradle_cache - save_bundler_cache - run: name: Analyze on SonarCloud - command: ./gradlew lintDebug sonar + command: ./gradlew sonar - codecov/upload: files: app/build/mergedReportDir/jacocoTestReport/jacocoTestReport.xml - store_test_results: diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 8cf3ac6..620c360 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -33,11 +33,6 @@ platform :android do ]) end - desc "Runs lint" - lane :lint do - gradle(task: "lintDebug") - end - desc "Deploy to Firebase AppTester Dev channel" lane :distDev do gradle(tasks: [ From fe5b8ab73c92bad89d1da4a4f686b6ef2b525e64 Mon Sep 17 00:00:00 2001 From: Ali Kabiri Date: Sun, 20 Jul 2025 07:47:59 +0200 Subject: [PATCH 04/10] ci: hopefully add caching to jobs that run on docker --- .circleci/config.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 43f4103..23248e6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -77,14 +77,15 @@ jobs: executor: android-docker resource_class: large steps: - - checkout - - restore_gradle_cache + - setup_android - run: name: Prepare Fastlane command: sudo bundle update - run: name: Distribute to Firebase AppTester Dev command: bundle exec fastlane distDev + - save_gradle_cache + - save_bundler_cache - store_artifacts: path: /home/circleci/project/app/build/outputs/apk/debug/app-debug.apk destination: fastlane-output-debug @@ -93,8 +94,7 @@ jobs: executor: android-docker resource_class: large steps: - - checkout - - restore_gradle_cache + - android_setup - run: name: Prepare Fastlane command: sudo bundle update @@ -104,6 +104,8 @@ jobs: - run: name: Distribute to Firebase AppTester Prod command: bundle exec fastlane distProd + - save_gradle_cache + - save_bundler_cache - store_artifacts: path: /home/circleci/project/app/build/outputs/bundle/release/app-release.aab destination: fastlane-output-release From ce84bd4bb3e0f6102b2f0b2abfb34f291f3fbe69 Mon Sep 17 00:00:00 2001 From: Ali Kabiri Date: Sun, 20 Jul 2025 07:49:19 +0200 Subject: [PATCH 05/10] fix: fix incorrect jobname in the config --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 23248e6..19253e7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -94,7 +94,7 @@ jobs: executor: android-docker resource_class: large steps: - - android_setup + - setup_android - run: name: Prepare Fastlane command: sudo bundle update From 47141c3dc1bd3ec4f1aed2d07009fa5ed67c108b Mon Sep 17 00:00:00 2001 From: Ali Kabiri Date: Sun, 20 Jul 2025 07:54:58 +0200 Subject: [PATCH 06/10] chore: update bundlder dependencies --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4ec9b03..9b2175e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,8 +10,8 @@ GEM artifactory (3.0.17) atomos (0.1.3) aws-eventstream (1.4.0) - aws-partitions (1.1125.0) - aws-sdk-core (3.226.2) + aws-partitions (1.1131.0) + aws-sdk-core (3.226.3) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) aws-sigv4 (~> 1.9) @@ -21,7 +21,7 @@ GEM aws-sdk-kms (1.106.0) aws-sdk-core (~> 3, >= 3.225.0) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.192.0) + aws-sdk-s3 (1.193.0) aws-sdk-core (~> 3, >= 3.225.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) @@ -164,13 +164,13 @@ GEM httpclient (2.9.0) mutex_m jmespath (1.6.2) - json (2.12.2) + json (2.13.0) jwt (2.10.2) base64 logger (1.7.0) mini_magick (4.13.2) mini_mime (1.1.5) - multi_json (1.15.0) + multi_json (1.17.0) multipart-post (2.4.1) mutex_m (0.3.0) nanaimo (0.4.0) From 33df2926abd6950a4a140de96f5459187730973d Mon Sep 17 00:00:00 2001 From: Ali Kabiri Date: Sun, 20 Jul 2025 07:58:33 +0200 Subject: [PATCH 07/10] ci: include architecture in bundler cache key --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 19253e7..fb75457 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ commands: restore_bundler_cache: steps: - restore_cache: - key: v1-bundler-cache-{{ checksum "Gemfile.lock" }} + key: v1-bundler-cache-{{ arch }}-{{ checksum "Gemfile.lock" }} save_gradle_cache: steps: From 7c8ee5173a9c55b46341379317295b6d5121a83c Mon Sep 17 00:00:00 2001 From: Ali Kabiri Date: Sun, 20 Jul 2025 08:06:57 +0200 Subject: [PATCH 08/10] ci: update ruby orb --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fb75457..c017251 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 orbs: codecov: codecov/codecov@5.4.3 - ruby: circleci/ruby@2.0.0 + ruby: circleci/ruby@2.5.3 commands: restore_gradle_cache: From 2bd8f85b76e53c5ec4f9ba98c5712d21abf2ecfe Mon Sep 17 00:00:00 2001 From: Ali Kabiri Date: Sun, 20 Jul 2025 08:10:28 +0200 Subject: [PATCH 09/10] ci: update circleci android-machine and android-docker --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c017251..8b156de 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,10 +45,10 @@ commands: executors: android-machine: machine: - image: android:2024.01.1 + image: android:2024.11.1 android-docker: docker: - - image: cimg/android:2024.01 + - image: cimg/android:2025.04 jobs: android-test: From 4c903877dfdc74ffbe1db8f75c505f4f0689410d Mon Sep 17 00:00:00 2001 From: Ali Kabiri Date: Sun, 20 Jul 2025 08:17:53 +0200 Subject: [PATCH 10/10] ci: avoid manually installing ruby in docker images that already provide it --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8b156de..2bb8aa1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,8 +39,6 @@ commands: - checkout - restore_gradle_cache - restore_bundler_cache - - ruby/install-deps: - with-cache: true executors: android-machine: @@ -56,6 +54,8 @@ jobs: resource_class: large steps: - setup_android + - ruby/install-deps: + with-cache: true - run: name: Fastlane - run all tests with coverage report command: |