Skip to content

Commit

Permalink
Changes done to adopt the latest Facebook fix provided facebook/react…
Browse files Browse the repository at this point in the history
  • Loading branch information
shahfaizalpayu committed Nov 7, 2022
1 parent 6009bee commit c3ce62c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
18 changes: 4 additions & 14 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,6 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
pickFirst 'lib/armeabi-v7a/libfbjni.so'
pickFirst 'lib/arm64-v8a/libc++_shared.so'
pickFirst 'lib/arm64-v8a/libfbjni.so'
pickFirst 'lib/x86_64/libfbjni.so'
pickFirst 'lib/x86/libfbjni.so'
pickFirst 'lib/x86/libc++_shared.so'
pickFirst 'lib/x86_64/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
}

defaultConfig {
applicationId "com.example"
Expand Down Expand Up @@ -168,10 +158,10 @@ android {

dependencies {
if (enableHermes) {
//noinspection GradleDynamicVersion
implementation("com.facebook.react:hermes-engine:+") { // From node_modules
exclude group:'com.facebook.fbjni'
}
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")

} else {
implementation jscFlavor
}
Expand Down
8 changes: 8 additions & 0 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ buildscript {
}
}

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())

allprojects {
configurations.all {
resolutionStrategy {
// Remove this override in 0.65+, as a proper fix is included in react-native itself.
force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
}
}
repositories {
mavenLocal()
mavenCentral()
Expand Down
1 change: 0 additions & 1 deletion example/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
org.gradle.jvmargs=-Xmx2048m
android.useAndroidX=true
android.enableJetifier=true
MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"js-sha512": "^0.8.0",
"payu-non-seam-less-react": "^3.0.0",
"react": "16.13.1",
"react-native": "^0.64.2"
"react-native": "^0.64.4"
},
"devDependencies": {
"@babel/core": "7.11.5",
Expand Down

0 comments on commit c3ce62c

Please sign in to comment.