prscX / react-native-selection-menu

React Native: Native Selection Menu
Apache License 2.0
110 stars 8 forks source link

Fixed Gradle setup #14

Closed SaeedZhiany closed 4 years ago

SaeedZhiany commented 4 years ago

This wraps the Android Gradle plugin dependency in the buildscripts section of android/build.gradle in a conditional:

if (project == rootProject) {
    // ... (dependency here)
}

The Android Gradle plugin is only required when opening the project stand-alone, not when it is included as a dependency. By doing this, the project opens correctly in Android Studio, and it can also be consumed as a native module dependency from an application project without affecting the app project (avoiding unnecessary downloads/conflicts/etc).

for more info, you can refer to this thread and especially this comment.

prscX commented 4 years ago

Thanks @SaeedZhiany for the PR and Effort.

I have merged and pushed the release V1.0.1.

Thanks </ Pranav >