Build Configuration
The eas.json file in your project root defines how EAS Build compiles your app. This guide covers all configuration options for creating optimized builds.eas.json Structure
eas.json
Top-Level Sections
- cli: EAS CLI behavior and requirements
- build: Build profiles for different environments
- submit: App store submission configuration
CLI Configuration
Control EAS CLI behavior globally:eas.json
version: Minimum required EAS CLI versionrequireCommit: Require clean git state before buildsappVersionSource:"local"|"remote"- Where to get app versionpromptToConfigurePushNotifications: Auto-configure push notifications
Build Profiles
Profiles define different build configurations for various use cases.Default Profiles
When you runeas build:configure, these profiles are created:
eas.json
Profile Inheritance
Extend profiles to reduce duplication:eas.json
Common Build Options
Options available for all platforms:Distribution
"store": For app store submission (AAB for Android, IPA for iOS)"internal": For internal distribution (APK for Android, Ad Hoc for iOS)
EAS Update Channel
Development Client
Environment Variables
EXPO_PUBLIC_).
Node.js Version
Credentials Source
"remote": Use credentials from EAS servers"local": Use credentials from credentials.json
Resource Class
"default" | "medium" | "large" - Larger classes provide more CPU/memory.
Cache Configuration
Android-Specific Options
Configure Android builds:Build Type
"app-bundle"(default): Creates AAB for Play Store"apk": Creates APK for direct installation
Gradle Command
:app:assembleRelease- Build release APK:app:bundleRelease- Build release AAB:app:assembleDebug- Build debug APK
Build Image
Auto-Increment Version Code
versionCode for each build.
NDK Version
Without Credentials
Complete Android Example
eas.json
iOS-Specific Options
Configure iOS builds:Simulator Build
Build Configuration
Scheme
Build Image
CocoaPods Version
Auto-Increment Build Number
CFBundleVersion for each build.
Bundle Identifier
Enterprise Provisioning
Complete iOS Example
eas.json
Multi-Platform Configurations
Configure both platforms with different settings:eas.json
Environment Variables
Build-Time Variables
Available during the build process only:Runtime Variables (EXPO_PUBLIC_)
Available in your app code:Secret Variables
For sensitive values, use EAS Secrets:Platform-Specific Environment Variables
eas.json
Advanced Configurations
Custom Build Functions
Run custom JavaScript during the build: Create eas-hooks/custom-build.js:Monorepo Configuration
For monorepo projects:eas.json
Build Variants (Android)
Build different flavors of your Android app:eas.json
Multiple Build Configurations
Real-world example with multiple environments:eas.json
Troubleshooting
Invalid eas.json
Common errors:- Missing commas between properties
- Trailing commas in objects/arrays
- Invalid property names
- Wrong value types (string vs boolean)
Profile Not Found
Environment Variables Not Available
Ifprocess.env.EXPO_PUBLIC_API_URL is undefined:
- Ensure variable is prefixed with
EXPO_PUBLIC_ - Rebuild the app (env vars are embedded at build time)
- Check eas.json has the variable in the correct profile
Inheritance Issues
When usingextends, child profiles override parent values:
A=1 and B=3.
Next Steps
- Building Standalone Apps - Create your builds
- App Signing - Configure credentials
- Internal Distribution - Share builds with team
- Over-the-Air Updates - Deploy updates without rebuilding