Commit 1048304
authored
loaded Android Gradle Plugin Conditionally (#18)
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](facebook/react-native#25569) and
especially [this
comment.](facebook/react-native#25569 (comment))1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
4 | 8 | | |
5 | | - | |
| 9 | + | |
6 | 10 | | |
7 | | - | |
8 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
| |||
0 commit comments