Skip to content

Commit 91cbddc

Browse files
committed
Enable hermes in GH example
1 parent c4a8dea commit 91cbddc

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Example/android/app/build.gradle

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ import com.android.build.OutputFile
6666
*/
6767
project.ext.react = [
6868
entryFile: "index.js",
69+
enableHermes: true
6970
]
7071

7172
apply from: "../../node_modules/react-native/react.gradle"
@@ -105,7 +106,6 @@ android {
105106
reset()
106107
enable enableSeparateBuildPerCPUArchitecture
107108
universalApk false // If true, also generate a universal APK
108-
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
109109
}
110110
}
111111
buildTypes {
@@ -127,6 +127,15 @@ android {
127127
}
128128
}
129129
}
130+
131+
packagingOptions {
132+
pickFirst '**/armeabi-v7a/libc++_shared.so'
133+
pickFirst '**/x86/libc++_shared.so'
134+
pickFirst '**/arm64-v8a/libc++_shared.so'
135+
pickFirst '**/x86_64/libc++_shared.so'
136+
pickFirst '**/x86/libjsc.so'
137+
pickFirst '**/armeabi-v7a/libjsc.so'
138+
}
130139
}
131140

132141
dependencies {
@@ -136,6 +145,10 @@ dependencies {
136145
implementation project(':react-native-gesture-handler')
137146
implementation fileTree(dir: "libs", include: ["*.jar"])
138147
implementation "com.facebook.react:react-native:+" // From node_modules
148+
149+
def hermesPath = "../../node_modules/hermesvm/android/";
150+
debugImplementation files(hermesPath + "hermes-debug.aar")
151+
releaseImplementation files(hermesPath + "hermes-release.aar")
139152
}
140153

141154
// Run this once to be able to run the application with BUCK

0 commit comments

Comments
 (0)