Why are my Android AAB builds getting slower on Codemagic, and how can I speed them up?
Last updated: June 26, 2026
If your Android AAB builds on Codemagic have gradually become slower, this is commonly due to project growth (more code and dependencies) and updates in build tools like Gradle.
Answer
To speed up your builds you can enable caching for Gradle and Pub-cache in codemagic.yaml
workflows:
android-workflow:
name: Android Workflow
max_build_duration: 120
instance_type: mac_mini_m2
cache:
cache_paths:
- $HOME/.gradle/caches
- $HOME/.pub-cache
Note: Caching takes effect after the first successful build.
Check your build logs for SDK/NDK installs
If you see lines like the following, those tools are being installed during each build:
Checking the license for package NDK (Side by side) 28.2.13676358... Installing NDK (Side by side) 28.2.13676358... Installing Android SDK Build-Tools 35...For iOS projects, cache CocoaPods
workflows: ios-workflow: name: iOS Workflow max_build_duration: 120 instance_type: mac_mini_m2 cache: cache_paths: - $HOME/Library/Caches/CocoaPods