new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Expo · EAS · all subjects

build-reference/android-builds

78 notes in this subject, read out of this brain and free to use. This is page 2 of 2.

Android build server image legacy ubuntu-22.04-jdk-17-ndk-r26b

The legacy 'ubuntu-22.04-jdk-17-ndk-r26b'-like image is marked as 'sdk-51' and 'sdk-52' aliases. It uses Docker image 'ubuntu:jammy-v20250112' with NDK 26.1.10909125, Node.js 20.18.3, Bun 1.2.4, Yarn 1.22.22, pnpm 9.15.5, npm 10.8.2, Java 17, and node-gyp 11.1.0.

Android build server image ubuntu-22.04-jdk-11-ndk-r23b

The 'ubuntu-22.04-jdk-11-ndk-r23b' image is marked as 'sdk-49' alias. It uses Docker image 'ubuntu:jammy-20220810' with NDK 23.1.7779620, Node.js 18.18.0, Bun 1.0.14, Yarn 1.22.19, pnpm 8.7.5, npm 9.8.1, Java 11, and node-gyp 10.0.1.

Android build server image ubuntu-22.04-jdk-11-ndk-r21e

The 'ubuntu-22.04-jdk-11-ndk-r21e' image uses Docker image 'ubuntu:jammy-20220810' with NDK 21.4.7075529, Node.js 18.18.0, Bun 1.0.14, Yarn 1.22.19, pnpm 8.7.5, npm 9.8.1, Java 11, and node-gyp 10.0.1.

Android build server image ubuntu-20.04-jdk-8-ndk-r19c deprecated

The 'ubuntu-20.04-jdk-8-ndk-r19c' image is deprecated. It uses Docker image 'ubuntu:focal-20220823' with NDK 19.2.5345600, Node.js 18.18.0, Bun 1.0.14, Yarn 1.22.19, pnpm 7.0.0, npm 9.8.1, Java 8, and node-gyp 10.0.1.

EAS Build default npm cache registry for Android

By default, EAS Build for Android uses a self-hosted npm cache configured with the registry URL http://npm-cache-service.worker-infra-production.svc.cluster.local:4873. This is set in the .npmrc file automatically for all Android builds.

Android flavor configuration for app variants

In android/app/build.gradle, create separate product flavors for each build profile in eas.json. For example, create production and development flavors in flavorDimensions "env" block, each with a distinct applicationId. EAS CLI currently supports only the applicationId field; applicationIdSuffix is not detected correctly.

Assign Android flavors to EAS Build profiles with gradleCommand

In eas.json, specify the gradleCommand property within android section of each build profile to assign Android flavors. For example, development profile uses ":app:assembleDevelopmentDebug" and production profile uses ":app:bundleProductionRelease".

Example Android flavor configuration in build.gradle

android { flavorDimensions "env" productFlavors { production { dimension "env" applicationId 'com.myapp' } development { dimension "env" applicationId 'com.myapp.dev' } } }

Restrict Android flavor to specific build type

Use variantFilter in android/app/build.gradle to restrict specific flavors to debug or release mode. This prevents building invalid combinations, for example, ensuring production only builds in release mode and development only in debug mode.

Customize app name per Android flavor

Create android/app/src/{flavor}/res/values/strings.xml with a custom app_name string resource. For example, android/app/src/development/res/values/strings.xml can contain <string name="app_name">MyApp - Dev</string> to differentiate the development build's display name.

Set flavor-specific Android resources and assets

Create android/app/src/{flavor}/res/mipmap-* directories with appropriate assets to customize the app icon per flavor. Copy assets from android/app/src/main/res and replace icon files for specific flavors.

Configure flavor-specific google-services.json for Android

Place google-services.json for a specific flavor in android/app/src/{flavor}/google-services.json to use different Firebase configurations per flavor.

Configure Sentry per Android flavor and build type

Add project.ext.sentryCli = [ flavorAware: true ] to android/app/build.gradle and name Sentry properties files as android/sentry-{flavor}-{buildType}.properties. For example, android/sentry-production-release.properties for the production release variant.

eas/inject_android_credentials function

The eas/inject_android_credentials function is only available for Android builds. It configures Android keystore with credentials on the builder and injects app signing config using these credentials into gradle config. It has the following properties: name (optional, defaults to 'Inject Android credentials'), inputs.credentials (optional, json, defaults to ${ eas.job.secrets.buildCredentials }).

eas/configure_android_version function

The eas/configure_android_version function is only available for Android builds. It configures the version of your Android app. It's used to set a version when using remote app version management. It is not mandatory to use this function; if not used the version from native code generated during the prebuild phase will be used. It has the following properties: name (optional, defaults to 'Configure Android version'), inputs.version_code (optional, string, defaults to ${ eas.job.version.versionCode }), inputs.version_name (optional, string, defaults to ${ eas.job.version.versionName }).

eas/run_gradle function

The eas/run_gradle function is only available for Android builds. It runs a Gradle command to build an Android app. It has the following properties: name (optional, defaults to 'Run gradle'), inputs.command (optional, string, the Gradle command to run to build the Android app, resolved based on build configuration if not specified).

Development build Android YAML configuration example

Example of simple internal distribution Android build YAML config: ```yaml build: name: Simple internal distribution Android build steps: - eas/checkout - eas/install_node_modules - eas/prebuild - eas/inject_android_credentials - eas/run_gradle - eas/find_and_upload_build_artifacts ```

Production build Android YAML configuration example

Example of customized Android Play Store build: ```yaml build: name: Customized Android Play Store build example steps: - eas/checkout - eas/install_node_modules - eas/prebuild - eas/inject_android_credentials - eas/run_gradle - eas/find_and_upload_build_artifacts ```

Give your agent this brain