了解 EAS 构建和 EAS 提交的可用属性,以在项目中配置和覆盖它们的默认行为。
eas.json 是 EAS CLI 和服务的配置文件。你可以在此页面上找到 EAS 构建 和 EAS 提交 的所有可用架构属性的完整参考。
¥eas.json is the configuration file for EAS CLI and services. You can find the complete reference of all available schema properties for EAS Build and EAS Submit on this page.
要了解有关如何使用 eas.json 配置使用 EAS 服务的项目的更多信息,请参阅 使用 eas.json 配置 EAS 构建 和 使用 eas.json 配置 EAS 提交。
¥EAS Build
eas.json 中 build
键的架构中提供以下属性。
¥The following properties are available in the schema for the build
key in eas.json.
{
"build": {
"base": {
"node": "12.13.0",
"yarn": "1.22.5",
"env": {
"EXAMPLE_ENV": "example value"
},
"android": {
"image": "default",
"env": {
"PLATFORM": "android"
}
},
"ios": {
"image": "latest",
"env": {
"PLATFORM": "ios"
}
}
},
"development": {
"extends": "base",
"developmentClient": true,
"env": {
"ENVIRONMENT": "development"
},
"android": {
"distribution": "internal",
"withoutCredentials": true
},
"ios": {
"simulator": true
}
},
"staging": {
"extends": "base",
"env": {
"ENVIRONMENT": "staging"
},
"distribution": "internal",
"android": {
"buildType": "apk"
}
},
"production": {
"extends": "base",
"env": {
"ENVIRONMENT": "production"
}
}
}
}
¥Common properties for native platforms
Property | Description |
---|---|
(boolean) - When set to | |
(string) - The name of the build profile that the current one should inherit values from. This value can't be specified per platform. | |
(enum: local, remote) - The source of credentials used to sign the application archive.
| |
(string) - Deprecated: Name of the release channel for the Classic Updates service, which is only supported in SDK 49 and lower. If you do not specify a channel, your binary will pull releases from the EAS Update uses the channel field, so you can remove | |
(string) - The EAS Update channel where this build will look for updates. Learn more. Standalone builds will check for and download updates matching platform, native runtime, and channel. This field has no effect when If you have not yet migrated from Classic Updates to EAS Update, then continue to use the | |
(enum: store, internal) - The method of distributing your app.
| |
(boolean) - If set to Note: this field is for setting the | |
(enum: default, medium, large) - The resource class that will be used to run this build. To see mapping for each platform, see Android-specific resource class field and iOS-specific resource class field. The | |
(string) - Optional override of the prebuild command used by EAS. For example, you can specify Note: | |
(string[]) - List of paths (or patterns) where EAS Build is going to look for the build artifacts. Use | |
(string) - Version of Node.js used for build. | |
(string) - Version of Yarn used for build. | |
(string) - Version of pnpm used for build. | |
(string) - Version of Bun used for build. You can also use a specific version. Learn how to configure the exact version in eas.json. | |
(string) - Deprecated: Version of For newer SDKs, EAS Build will use the versioned Expo CLI. It is included with | |
(object) - Environment variables that should be set during the build process. It should only be used for values that you would commit to your git repository and not for passwords or secrets. | |
(boolean) - Controls how EAS CLI bumps your application build version. Defaults to When enabled, for Android, bumps | |
(object) - Cache configuration. This feature is intended for caching values that require a lot of computation. For example, compilation results (both final binaries and any intermediate files). However, it doesn'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 | |
(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. | |
(string) - Custom workflow file name that will be used to run this build. You can also specify this property on platform level for platform-specific workflows. Learn more. Example: |
¥Android-specific options
Property | Description |
---|---|
(boolean) - When set to | |
(string) - Image with build environment. | |
(enum: default, medium, large) - The Android-specific resource class that will be used to run this build. Defaults to For information on available build resources for each resource class, see Android build server configurations. The | |
(string) - Version of Android NDK. | |
(boolean | "version" | "versionCode") - Controls how EAS CLI bumps your application build version. Defaults to Allowed values:
Based on the value of | |
(enum: app-bundle, apk) - Type of the artifact you want to build. It controls which Gradle task will be used to build the project. It can be overridden by
| |
(string) - Gradle task that will be used to build your project. For example, | |
(string) - Path (or pattern) where EAS Build is going to look for the application archive. EAS Build uses the | |
(string) - Custom workflow file name that will be used to run this Android build. You can also specify this property on profile level for platform-agnostic workflows. Learn more. Example: |
¥iOS-specific options
Property | Description |
---|---|
(boolean) - When set to | |
(boolean) - If set to true, creates build for iOS Simulator. Defaults to | |
(enum: universal, adhoc) - Provisioning method used for | |
(boolean | "version" | "buildNumber") - Controls how EAS CLI bumps your application build version. Defaults to Allowed values:
Based on the value of | |
(string) - Image with build environment. | |
(enum: default, medium, large) - The iOS-specific resource class that will be used to run this build. Defaults to For information on available build resources for each resource class, see iOS build server configurations. The | |
(string) - Version of bundler. | |
(string) - Version of fastlane. | |
(string) - Version of CocoaPods. | |
(string) - Xcode project's scheme. If a project:
| |
(string) - Xcode project's Build Configuration.
It takes priority over | |
(string) - Path (or pattern) where EAS Build is going to look for the application archive. EAS Build uses the | |
(string) - Custom workflow file name that will be used to run this iOS build. You can also specify this property on profile level for platform-agnostic workflows. Learn more. Example: |
¥EAS Submit
eas.json 中 submit
键的架构中提供以下属性。
¥The following properties are available in the schema for the submit
key in eas.json.
{
"cli": {
"version": ">= 0.34.0"
},
"submit": {
"production": {
"android": {
"serviceAccountKeyPath": "../path/to/api-xxx-yyy-zzz.json",
"track": "internal"
},
"ios": {
"appleId": "john@turtle.com",
"ascAppId": "1234567890",
"appleTeamId": "AB12XYZ34S"
}
}
}
}
¥Android-specific options
Property | Description |
---|---|
(string) - Path to the JSON file with Google Service Account Key used to authenticate with Google Play. | |
(enum: production, beta, alpha, internal) - The track of the application to use. | |
(enum: completed, draft, halted, inProgress) - The status of a release. | |
(number) - The initial fraction of users who are eligible to receive the release. Should be a value from 0 (no users) to 1 (all users). Works only with | |
(boolean) - Indicates that the changes sent with this submission will not be reviewed until they are explicitly sent for review from the Google Play Console UI. Defaults to | |
(string) - The application ID that is used when accessing Service Account Key managed by Expo. It does not have any effect if you are using local credentials. In most cases this value will be autodetected. However, if you have multiple product flavors, this value might be necessary. |
¥iOS-specific options
Property | Description |
---|---|
(string) - Your Apple ID username (you can also set the | |
(string) - App Store Connect unique application Apple ID number. When set, results in skipping the app creation step. | |
(string) - Your Apple Developer Team ID. | |
(string) - An unique ID for your app that is not visible on the App Store, will be generated unless provided. | |
(string) - Primary language. Defaults to "en-US". | |
(string) - The name of your company, needed only for the first submission of any app to the App Store. | |
(string) - The name of your app as it will appear on the App Store. Defaults to | |
(string) - The path to your App Store Connect Api Key .p8 file. | |
(string) - The Issuer ID of your App Store Connect Api Key. | |
(string) - The Key ID of your App Store Connect Api Key. | |
(string) - The bundle identifier that will be used when accessing submit credentials managed by Expo. It does not have any effect if you are using local credentials. In most cases, this value will be autodetected. However, if you have multiple Xcode schemes and targets, this value might be necessary. | |
(string) - The path to your store configuration file. |