Skip to content

Conversation

SaeedZhiany
Copy link

@SaeedZhiany SaeedZhiany commented Feb 13, 2019

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.

@brody4hire
Copy link

This change is now part of create-react-native-module, which also adds very basic view component support, as an option.

@brody4hire brody4hire mentioned this pull request Apr 7, 2019
brody4hire pushed a commit to brody4hire/create-react-native-module that referenced this pull request Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants