mkuczera / react-native-haptic-feedback

React-Native Haptic Feedback for iOS with Android similar behaviour.
MIT License
872 stars 106 forks source link

Rename from the default package name of react-native libraries #21

Closed mriddle closed 6 years ago

mriddle commented 6 years ago

Using the com.reactlibrary package will cause conflicts if the user of this library uses another that's doing the same.

Can cause errors like

Error:Execution failed for task ':app:processDebugResources'.
:More than one library with package name 'com.reactlibrary'

Or

Error:Execution failed for task ':app:transformDexArchiveWithDexMergerForReleaseD8'
Program type already present: com.reactlibrary.BuildConfig

The convention seems to be using the library owners name as part of the package.

Note This will be a breaking change for those that already have this installed. They'll need to manually update the reference in their MainApplication.java file.

 import android.support.multidex.MultiDexApplication;
 import com.facebook.react.ReactApplication;
-import com.reactlibrary.RNReactNativeHapticFeedbackPackage;
+import com.mkuczera.RNReactNativeHapticFeedbackPackage;
 import au.com.up.contactpicker.RNContactPickerPackage;
 import io.invertase.firebase.RNFirebasePackage;
 import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;
mkuczera commented 6 years ago

Thank you very much. I will prepare the Release