Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update android.js #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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.

@brodycj
Copy link

brodycj commented Feb 28, 2019

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

@brodycj brodycj mentioned this pull request Apr 7, 2019
brodycj pushed a commit to brodycj/create-react-native-module that referenced this pull request Apr 9, 2019
Merge commit 'refs/pull/102/head' of https://github.com/frostney/react-native-create-library into dev

Updates the Android Gradle version to 3.3.2 in generated android/build.gradle to match
https://github.com/facebook/react-native/blob/0.59-stable/template/android/build.gradle

as proposed in frostney/react-native-create-library#102
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