EAS Build — February Preview Update
Expo Team
Posted on February 18, 2021
In December, we announced our preview of two new services: EAS Build and Submit — the first services available from Expo Application Services (EAS).
Today, we wanted to share with you some of the updates and improvements we have been working on based on feedback we’ve received from developers just like you.
Multi-target support
If your iOS app makes use of App Extensions like the Share Extension or the new Widget Extension, you’ll need to provide credentials for every target in your Xcode project.
With our first version of multi-target support, you can now specify these targets by opting into locally managed credentials via credentials.json:
Here we have our main application target multitarget
and a Share Extension target shareextension.
With this new support, you’ll be able to use EAS Build to build your iOS apps with App Extensions as well as integrate with services that require them.
In the future, we also plan to add support for multi-target projects to our automatically managed credentials. Until then, you can learn more about multi-target projects via credentials.json in our docs.
Improved monorepo support
yarn/npm install now executes in the root of the workspace in yarn and npm workspaces.
Run your EAS CLI commands from the root of the app directory; for example, if your project exists inside of your git repository at apps/my-app, then run eas build from there. Don't forget — each app directory should have its own copy of eas.json and, if you use it, credentials.json.
If you’d like to learn more, you can check out How to Set Up EAS Build with a Monorepo as well as the EAS monorepo example.
Configurable build environments
We are always looking for ways to add more customization options to EAS Build. With this next step, we’ve added additional configuration options that you can set via eas.json:
extends - name of build profile that current profile inherits values from
image - image with build environment. Learn more about it here.
node - version of Node.js
yarn - version of Yarn
ndk - version of Android NDK
env - 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).
Your build profile in eas.json could look something like this now!
Currently, only one image is supported on each platform at the moment; however, more images will be available in the future.
Learn more about configuring your build with eas.json.
Additional configuration options for iOS builds
Continuing with greater configuration, you can now add autoIncrement and schemeBuildConfiguration to your eas.json file for iOS projects.
autoIncrement allows you to specify if and how EAS CLI increments your application build version; options include false (default), version, and buildNumber.
schemeBuildConfiguration specifies the configuration to use; either Release or Debug. Otherwise, it defaults to the existing configuration in your project.
To learn more about these options and other configuration options, please check out our documentation on Configuration with eas.json.
npm hooks
We’ve added three EAS Build-specific npm hooks that you can use to run custom scripts:
eas-build-pre-install - executes before EAS Build runs yarn install
eas-build-post-install - executes at a slightly different time depending on the platform: for Android, after yarn install has completed; for iOS, after both yarn install and pod install have completed
eas-build-pre-upload-artifacts - this hook is triggered almost at the end of the build process, just before the build worker uploads your build artifacts to cloud storage
If you were using these npm hooks, your package.json might look something like this:
EAS internal distribution — UI refresh
EAS internal distribution lets you share builds of your app with trusted users without any delays and now it has a fresh new look!
Distribute your ad-hoc builds to approved users who can then download and install with their browser. It’s quick and flexible! Learn more by checking out our EAS internal distribution docs.
Canceling builds
Last, but certainly not least, is canceling builds! 😅 We’ve now added the ability to cancel your builds through both EAS CLI with eas build:cancel [BUILD_ID] as well as on Build Details pages:
More on the way
We’re not done yet! We have more improvements planned as we work towards a full release for EAS Build. Lots of exciting stuff — so do stay tuned!
As a reminder, previews of EAS Build and Submit are available to developers subscribed to the EAS Priority Plan, and they won’t be available on a free tier until they graduate from preview. If you’re not yet a Priority subscriber, you can try it out for free for a month. If you want to try the preview services out but don’t have access to a credit card, please reach out to us on Twitter and we can help you out.
Once you’re signed up, you can find everything that you need to know in the Feature Preview documentation. If you’d like to watch a quick video walkthrough of EAS Build and Submit, check out this YouTube video:
Posted on February 18, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
August 19, 2024