Kudo / react-native-v8

Opt-in V8 runtime for React Native Android
MIT License
914 stars 69 forks source link

Support expo-dev-client #142

Closed Kudo closed 1 year ago

Kudo commented 1 year ago

Why

expo-dev-client has bundled reanimated that doesn't support v8. this pr is addressing the issue.

How

this is a just work and not perfect solution. since expo-dev-client is only for debug build, we could leave jsc libraries only in debug build. originally our config-plugin tries to remove libjsc* for all build variants. now the config-plugin only removes jsc in release build. it will append the following statements into android/app/build.gradle

// @generated begin react-native-v8 - expo prebuild (DO NOT MODIFY) sync-82a32619f78958d84e700d6fd28589aa422b6a61

android {
    androidComponents {
        onVariants(selector().withBuildType('release')) {
            packaging.jniLibs.excludes.add('**/**/libjsc*')
            packaging.jniLibs.excludes.add('**/**/libhermes*')
        }
    }
}
// @generated end react-native-v8