CodeBlanks Logo Icon CodeBlanks

eas.json

Learn the eas.json configuration.

eas.json structure

eas.json is the configuration file for EAS services. It has three main sections: "build" for build profiles, "submit" for store submission, "cli" for general settings. Each section holds named profiles.

Profiles split by environment: development, preview, production. Each profile can take different signing, channel and version settings. This file goes into version control; keys and passwords never go here, they come from environment variables.

cli and app version

The "cli" section tunes EAS tool behavior. For example version pins the eas-cli version; this way the team uses the same release. appVersionSource decides where the version number comes from.

In the "production" profile autoIncrement raises the version number by one on every build. This prevents the "version conflict" error when submitting to the store. You write the setting as { "autoIncrement": true }. This way you do not bump the number by hand before each submit.

Practice Write the production profile

Add a "production" profile to the "build" section of eas.json. The profile is an object carrying an "autoIncrement" field set to true.

Starter code

App.js
{
  "build": {
    "preview": { "android": { "buildType": "apk" } }
    // add the production profile here
  }
}

Sample solution

App.js
{
  "build": {
    "preview": { "android": { "buildType": "apk" } },
    "production": {
      "autoIncrement": true
    }
  }
}

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 Write the development profile

Question
"development": ____ { "developmentClient": true }
Answer
"development": {} { "developmentClient": true }

Explanation: The development profile starts as an empty object.

2 What does autoIncrement do?

App.js
"production": { "autoIncrement": true }
  • Raises the version number Correct answer
  • Shrinks the bundle size
  • Cancels the build
  • Changes the app icon

Explanation: autoIncrement raises the version number by one on each build.

3 Match each section to its role

Term Meaning
build Build profiles
submit Store submission
cli Tool settings
production Release environment

All lessons in Advanced