Skip to content

Commit

Permalink
Improve support for Android users on M1 machine
Browse files Browse the repository at this point in the history
Summary:
This is a follow up to my previous diff. It applies the same customization for M1 users to the :ReactAndroid:hermes-engine build.

The two diffs are split so the first one can be cherry-picked into 0.68.1 if needed.

Changelog:
[Android] [Fixed] - Improve support for Android users on M1 machine

Reviewed By: mdvacca

Differential Revision: D35468658

fbshipit-source-id: c07822f6708f872456971378f44257f6c1e967ee
  • Loading branch information
cortinico authored and facebook-github-bot committed Apr 7, 2022
1 parent 4befd2a commit c5babd9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ReactAndroid/hermes-engine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,13 @@ android {
compileSdkVersion 31
buildToolsVersion = "31.0.0"

// Used to override the NDK path & version on internal CI
if (System.getenv("ANDROID_NDK") != null && System.getenv("LOCAL_ANDROID_NDK_VERSION") != null) {
ndkPath System.getenv("ANDROID_NDK")
ndkVersion System.getenv("LOCAL_ANDROID_NDK_VERSION")
// Used to override the NDK path/version on internal CI or by allowing
// users to customize the NDK path/version from their root project (e.g. for M1 support)
if (rootProject.hasProperty("ndkPath")) {
ndkPath rootProject.ext.ndkPath
}
if (rootProject.hasProperty("ndkVersion")) {
ndkVersion rootProject.ext.ndkVersion
}

defaultConfig {
Expand Down

0 comments on commit c5babd9

Please sign in to comment.