Skip to content

Commit 6de6985

Browse files
committed
build: only define android project for module maintenance, not in projects
react-native-community/discussions-and-proposals#151 (comment)
1 parent 856bba2 commit 6de6985

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

android/build.gradle

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
buildscript {
2-
repositories {
3-
google()
4-
jcenter()
5-
}
6-
7-
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.4.1'
2+
// The Android Gradle plugin is only required when opening the android folder stand-alone.
3+
// This avoids unnecessary downloads and potential conflicts when the library is included as a
4+
// module dependency in an application project.
5+
if (project == rootProject) {
6+
repositories {
7+
google()
8+
jcenter()
9+
}
10+
dependencies {
11+
classpath 'com.android.tools.build:gradle:3.5.0'
12+
}
913
}
1014
}
1115

0 commit comments

Comments
 (0)