Simplify react-native overrides when building from source
Summary: You may want to double-check that this works perfectly (I am trying to move away from RN-from-source, since my changes were upstreamed), but it seems to build without errors for me. And this has the advantage of working seamlessly with "rnpm", which isn't smart enough to add these excludes when linking modules. Closes https://github.com/facebook/react-native/pull/9954 Differential Revision: D4074059 fbshipit-source-id: e152945ea66605698c18c1d0d078fbf312f1658e
This commit is contained in:
parent
f930270b00
commit
cd6f9f95d2
|
@ -116,10 +116,10 @@ dependencies {
|
||||||
|
|
||||||
If you use 3rd-party React Native modules, you need to override their dependencies so that they don't bundle the pre-compiled library. Otherwise you'll get an error while compiling - `Error: more than one library with package name 'com.facebook.react'`.
|
If you use 3rd-party React Native modules, you need to override their dependencies so that they don't bundle the pre-compiled library. Otherwise you'll get an error while compiling - `Error: more than one library with package name 'com.facebook.react'`.
|
||||||
|
|
||||||
Modify your `android/app/build.gradle` and replace `compile project(':react-native-custom-module')` with:
|
Modify your `android/app/build.gradle`, and add:
|
||||||
|
|
||||||
```gradle
|
```gradle
|
||||||
compile(project(':react-native-custom-module')) {
|
configurations.all {
|
||||||
exclude group: 'com.facebook.react', module: 'react-native'
|
exclude group: 'com.facebook.react', module: 'react-native'
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue