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:
Mike Lambert 2016-10-25 04:29:48 -07:00 committed by Facebook Github Bot
parent f930270b00
commit cd6f9f95d2
1 changed files with 2 additions and 2 deletions

View File

@ -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'
} }
``` ```