react-nativereact-native-linking

react-native Link - repeated invocations keep appending to configuration files


React Native Link appears not to parse the previous changes to configurations files, and instead makes incremental, repetitive changes.

For instance, android/app/build.gradle starts with:

dependencies {
  compile project(':react-native-linear-gradient')
  compile project(':react-native-fcm')
  compile project(':react-native-cookie')
}

After first invocation of react-native link

dependencies {
  compile project(':react-native-vector-icons')
  compile project(':react-native-linear-gradient')
  compile project(':react-native-fcm')
  compile project(':react-native-cookie')
  compile project(':react-native-linear-gradient')
  compile project(':react-native-fcm')
  compile project(':react-native-cookie')
}

After second invocation...

dependencies {
  compile project(':react-native-vector-icons')
  compile project(':react-native-linear-gradient')
  compile project(':react-native-fcm')
  compile project(':react-native-cookie')
  compile project(':react-native-vector-icons')
  compile project(':react-native-linear-gradient')
  compile project(':react-native-fcm')
  compile project(':react-native-cookie')
  compile project(':react-native-linear-gradient')
  compile project(':react-native-fcm')
  compile project(':react-native-cookie')
}

And so on..

Any good place to start my investigation?


Solution

  • Hey your answer is there : react-native link causes duplicate imports in Android settings.gradle

    It is currently in PR and being tested.