Skip to content

Commit c3ce62c

Browse files
Changes done to adopt the latest Facebook fix provided facebook/react-native#35210
1 parent 6009bee commit c3ce62c

File tree

4 files changed

+13
-16
lines changed

4 files changed

+13
-16
lines changed

example/android/app/build.gradle

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,6 @@ android {
108108
sourceCompatibility JavaVersion.VERSION_1_8
109109
targetCompatibility JavaVersion.VERSION_1_8
110110
}
111-
packagingOptions {
112-
pickFirst 'lib/armeabi-v7a/libfbjni.so'
113-
pickFirst 'lib/arm64-v8a/libc++_shared.so'
114-
pickFirst 'lib/arm64-v8a/libfbjni.so'
115-
pickFirst 'lib/x86_64/libfbjni.so'
116-
pickFirst 'lib/x86/libfbjni.so'
117-
pickFirst 'lib/x86/libc++_shared.so'
118-
pickFirst 'lib/x86_64/libc++_shared.so'
119-
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
120-
}
121111

122112
defaultConfig {
123113
applicationId "com.example"
@@ -168,10 +158,10 @@ android {
168158

169159
dependencies {
170160
if (enableHermes) {
171-
//noinspection GradleDynamicVersion
172-
implementation("com.facebook.react:hermes-engine:+") { // From node_modules
173-
exclude group:'com.facebook.fbjni'
174-
}
161+
def hermesPath = "../../node_modules/hermes-engine/android/";
162+
debugImplementation files(hermesPath + "hermes-debug.aar")
163+
releaseImplementation files(hermesPath + "hermes-release.aar")
164+
175165
} else {
176166
implementation jscFlavor
177167
}

example/android/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,15 @@ buildscript {
2020
}
2121
}
2222

23+
def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())
24+
2325
allprojects {
26+
configurations.all {
27+
resolutionStrategy {
28+
// Remove this override in 0.65+, as a proper fix is included in react-native itself.
29+
force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
30+
}
31+
}
2432
repositories {
2533
mavenLocal()
2634
mavenCentral()

example/android/gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
# This option should only be used with decoupled projects. More details, visit
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
19-
org.gradle.jvmargs=-Xmx2048m
2019
android.useAndroidX=true
2120
android.enableJetifier=true
2221
MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"js-sha512": "^0.8.0",
1414
"payu-non-seam-less-react": "^3.0.0",
1515
"react": "16.13.1",
16-
"react-native": "^0.64.2"
16+
"react-native": "^0.64.4"
1717
},
1818
"devDependencies": {
1919
"@babel/core": "7.11.5",

0 commit comments

Comments
 (0)