Expo

Get Started
Feature Preview

Configuration with eas.json

eas.json is your go-to place for configuring EAS Build. It is located at the root of your project next to your package.json. It looks something like this:
{
  "builds": {
    "android": {
      "release": {
        "buildType": "app-bundle"
      },
      "development": {
        "buildType": "development-client",
        "distribution": "internal",
      }
    },
    "ios": {
      "release": {
        "buildType": "release"
      },
      "development": {
        "buildType": "development-client",
        "distribution": "internal"
      }
    }
  }
}
The JSON object under the builds key contains the platforms that you want to build for. The example above declares that you want to build app binaries for both Android and iOS platforms.
Each object under the platform key can contain multiple build profiles. Every build profile can have an arbitrary name. The default profile that is expected by EAS CLI to exist is release (if you'd like to build your app using another build profile you need to specify it with a parameter - eas build --platform android --profile foobar). In the example, there are two build profiles (one for Android and one for iOS) and they are both named release. However, they could be named foo or bar or whatever you'd like.
Generally, the schema of this file looks like this:
{
  "builds": {
    "PLATFORM_NAME": {
      "BUILD_PROFILE_NAME_1": { ... },
      "BUILD_PROFILE_NAME_2": { ... },
      ...,
    },
    ...
  }
}
where PLATFORM_NAME is one of android or ios.

Examples

A managed project with several common profiles
{
  "builds": {
    "android": {
      "base": {
        "image": "default",
        "env": {
          "EXAMPLE_ENV": "example value"
        }
      },
      "release": {
        "extends": "base",
        "env": {
          "ENVIRONMENT": "production"
        },
        "buildType": "app-bundle"
      },
      "staging": {
        "extends": "base",
        "env": {
          "ENVIRONMENT": "staging"
        },
        "distribution": "internal",
        "buildType": "apk"
      },
      "debug": {
        "extends": "base",
        "withoutCredentials": true,
        "env": {
          "ENVIRONMENT": "staging"
        },
        "distribution": "internal",
        "buildType": "development-client"
      }
    },
    "ios": {
      "base": {
        "image": "latest",
        "node": "12.13.0",
        "yarn": "1.22.5"
      },
      "release": {
        "extends": "base",
        "buildType": "release",
        "env": {
          "ENVIRONMENT": "production"
        },
      },
      "inhouse": {
        "extends": "base",
        "distribution": "internal",
        "enterpriseProvisioning": "universal",
        "env": {
          "ENVIRONMENT": "staging"
        }
      },
      "adhoc": {
        "extends": "base",
        "distribution": "internal",
        "env": {
          "ENVIRONMENT": "staging"
        }
      },
      "client": {
        "extends": "adhoc",
        "buildType": "development-client"
      }
    }
  }
}
A bare project with several common profiles
{
  "builds": {
    "android": {
      "base": {
        "image": "ubuntu-18.04-android-30-ndk-r19c",
        "ndk": "21.4.7075529",
        "env": {
          "EXAMPLE_ENV": "example value"
        }
      },
      "release": {
        "extends": "base",
        "env": {
          "ENVIRONMENT": "production"
        },
        "gradleCommand": ":app:bundleRelease"
      },
      "staging": {
        "extends": "base",
        "env": {
          "ENVIRONMENT": "staging"
        },
        "distribution": "internal",
        "gradleCommand": ":app:assembleRelease"
      },
      "debug": {
        "extends": "base",
        "withoutCredentials": true,
        "env": {
          "ENVIRONMENT": "staging"
        },
        "distribution": "internal",
        "gradleCommand": ":app:assembleDebug"
      }
    },
    "ios": {
      "base": {
        "image": "latest",
        "node": "12.13.0",
        "yarn": "1.22.5",
      },
      "release": {
        "extends": "base",
        "schemeBuildConfiguration": "Release",
        "scheme": "testapp",
        "env": {
          "ENVIRONMENT": "production"
        }
      },
      "inhouse": {
        "extends": "base",
        "distribution": "internal",
        "enterpriseProvisioning": "universal",
        "scheme": "testapp-enterprise",
        "env": {
          "ENVIRONMENT": "staging"
        }
      },
      "adhoc": {
        "extends": "base",
        "distribution": "internal",
        "scheme": "testapp",
        "env": {
          "ENVIRONMENT": "staging"
        }
      }
    }
  }
}

PropertyDescription
(string) - The name of the build profile that the current one should inherit values from.
(enum) - The source of credentials used to sign build artifacts.
  • local - if you want to provide your own credentials.json file. (learn more on this here).
  • remote - if you want to use the credentials managed by EAS (this is the default option).
(string) - Name of the release channel for the expo-updates package (Learn more about this). If you do not specify a channel, your binary will pull releases from the default channel. If you do not use expo-updates in your project then this property will have no effect.
(enum) - The method of distributing your app.
  • internal - with this option you'll be able to share your build URLs with anyone, and they will be able to install the builds to their devices straight from the Expo website. When using internal, make sure the build produces an APK file (e.g. gradleCommand: ":app:assembleRelease" or buildType: "apk" or "buildType": "development-client" ). Otherwise, the sharable URL will be useless. Learn more about internal distribution.
  • store - produces builds for store uploads, your build URLs won't be sharable.
(boolean) - When set to true, EAS CLI won't require you to configure credentials when building the app. This comes in handy when you want to build debug binaries and the debug keystore is checked in to the repository. The default is false.
(string) - Image with build environment. Learn more about it here.
(string) - Version of Node.js.
(string) - Version of Yarn.
(string) - Version of Android NDK.
(string) - Version of expo-cli used to prebuild your app. It does not have any effect on bare projects.
(object) - Environment variables that should be set during the build process (should only be used for values that you would commit to your git repository, i.e. not passwords or secrets).
(object) - Cache configuration. This feature is intended for caching values that require a lot of computation, e.g. compilation results (both final binaries and any intermediate files), but it wouldn't work well for node_modules because the cache is not local to the machine, so the download speed is similar to downloading from the npm registry.
(boolean) - Disables caching. Defaults to false.
(string) - Cache key. You can invalidate the cache by changing this value.
(array) - List of the paths that will be saved after a successful build and restored at the beginning of the next one. Both absolute and relative paths are supported, where relative paths are resolved from the directory with eas.json.
(enum) - Type of the artifact you want to build. It controls what Gradle task will be used, can be overridden by gradleCommand option.
  • app-bundle - :app:bundleRelease
  • apk - :app:assembleRelease
  • development-client - :app:assembleDebug
    • managed project: builds a development client
    • bare project: builds a development client (if configured)
(string) - Gradle task that will be used to build your project, e.g. :app:assembleDebug to build a debug binary. It's not recommended unless you need to run a task that buildType does not support, it takes priority over buildType.
(string) - Path (or pattern) where EAS Build is going to look for the build artifacts. EAS Build uses the fast-glob npm package for pattern matching (see their README to learn more about the syntax you can use). The default value is android/app/build/outputs/**/*.{apk,aab}.

PropertyDescription
(string) - The name of the build profile that the current one should inherit values from.
(enum) - The source of credentials used to sign build artifacts.
  • local - if you want to provide your own credentials.json file. (learn more on this here).
  • remote - if you want to use the credentials managed by EAS (this is the default option).
(string) - Name of the release channel for the expo-updates package (Learn more about this). If you do not specify a channel, your binary will pull releases from the default channel. If you do not use expo-updates in your project then this property will have no effect.
(enum) - The method of distributing your app.
  • internal - with this option you'll be able to share your build URLs with anyone, and they will be able to install the builds to their devices straight from the Expo website. Learn more about internal distribution.
  • simulator - creates build for simulator
  • store - produces builds for store uploads, your build URLs won't be sharable.
(enum) - Provisioning method used for "distribution": "internal" when you have an Apple account with Apple Developer Enterprise Program membership. You can choose if you want to use adhoc or universal provisioning. The latter is recommended as it does not require you to register each individual device. If you don't provide this option and you still authenticate with an enterprise team, you'll be prompted which provisioning method to use.
(boolean | "version" | "buildNumber") - Controls how EAS CLI bumps your application build version. Defaults to false
  • "version" - the patch of expo.version is bumped (e.g. 1.2.3 -> 1.2.4).
  • "buildNumber" (or true) - the last component of expo.ios.buildNumber is bumped (e.g. 1.2.3.39 -> 1.2.3.40).
  • false - versions won't be bumped automatically
In the case of a bare project, it also updates versions in native code. expo.version corresponds to CFBundleShortVersionString and expo.ios.buildNumber to CFBundleVersion in the Info.plist. The App Store is using those values to identify the app build, CFBundleShortVersionString is the version visible to users, whereas CFBundleVersion defines the build number. The combination of those needs to be unique, so you can bump either of them.
(string) - Image with build environment. Learn more about it here.
(string) - Version of Node.js.
(string) - Version of Yarn.
(string) - Version of bundler.
(string) - Version of fastlane.
(string) - Version of CocoaPods.
(string) - Version of expo-cli used to prebuild your app. It does not have any effect on bare projects.
(object) - Environment variables that should be set during the build process (should only be used for values that you would commit to your git repository, i.e. not passwords or secrets).
(object) - Cache configuration. This feature is intended for caching values that require a lot of computation, e.g. compilation results (both final binaries and any intermediate files), but it wouldn't work well for node_modules because the cache is not local to the machine, so the download speed is similar to downloading from the npm registry.
(boolean) - Disables caching. Dafults to false.
(string) - Cache key. You can invalidate the cache by changing this value.
(array) - List of the paths that will be saved after a successful build and restored at the beginning of the next one. Both absolute and relative paths are supported, where relative paths are resolved from the directory with eas.json.
(boolean) - Specifies whether to cache the recommended set of files, currently only Podfile.lock is included in the list. Defaults to true.
(enum) - Type of the artifact you want to build. It controls which Xcode Build Configuration will be used, can be overridden by schemeBuildConfiguration option.
  • release - Release
  • development-client - Debug
    • managed project: builds a development client
    • bare project: builds a development client (if configured)
(string) - Xcode project's scheme.
  • managed project: does not have any effect
  • bare project
    • If your project has multiple schemes, you should set this value.
    • If the project has only one scheme, it will be detected automatically.
    • If multiple schemes exist and this value is not set, EAS CLI will prompt you to select one of them.
(string) - Xcode project's Build Configuration.
  • managed project: "Release" or "Debug", defaults to "Release"
  • bare project: defaults to the value specified in the scheme
It takes priority over buildType.
(string) - Path (or pattern) where EAS Build is going to look for the build artifacts. EAS Build uses the fast-glob npm package for pattern matching, (see their README to learn more about the syntax you can use). You should modify that path only if you are using a custom Gymfile. The default is ios/build/Build/Products/*-iphonesimulator/*.app when building for simulator and ios/build/*.ipa in other cases.