Skip to content

Commit c5babd9

Browse files
cortinicofacebook-github-bot
authored andcommitted
Improve support for Android users on M1 machine
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
1 parent 4befd2a commit c5babd9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

ReactAndroid/hermes-engine/build.gradle

+7-4
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,13 @@ android {
101101
compileSdkVersion 31
102102
buildToolsVersion = "31.0.0"
103103

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

110113
defaultConfig {

0 commit comments

Comments
 (0)