Skip to content

Commit

Permalink
feat: add support for new React Native architecture
Browse files Browse the repository at this point in the history
  - pickFirst .so / c++ libs from android builds
  - exclude META-INF
  • Loading branch information
salah ghanim committed Apr 14, 2024
1 parent b57d22f commit 48665da
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
9 changes: 9 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ android {

buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
}
packagingOptions {
excludes = [
"META-INF",
"META-INF/**",
]
jniLibs {
pickFirsts += ['**/*.so']
}
}
}

repositories {
Expand Down
14 changes: 0 additions & 14 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -102,21 +102,7 @@ android {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
packagingOptions {
// MPAndroidChart uses androidX - remove this line when we migrate everything to androidX
exclude 'META-INF/proguard/androidx-annotations.pro'

// Exclude React Native's JSC and Fabric JNI
pickFirst '**/libjscexecutor.so'
pickFirst '**/libfabricjni.so'

// Avoid React Native's JNI duplicated classes
pickFirst '**/libc++_shared.so'
pickFirst '**/libfbjni.so'

pickFirst 'META-INF/-no-jdk.kotlin_module'

}
}

dependencies {
Expand Down

0 comments on commit 48665da

Please sign in to comment.