Skip to content

Commit

Permalink
fix: only define a gradle project for module maintenance
Browse files Browse the repository at this point in the history
This is the outcome of a react-native-community discussion with the goal
of avoiding downloading multiple gradle versions and/or loading multiple
versions at the same time

react-native-community/discussions-and-proposals#151 (comment)
  • Loading branch information
mikehardy committed Oct 8, 2019
1 parent da07c83 commit d81ec84
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
buildscript {
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
// The Android Gradle plugin is only required when opening the android folder stand-alone.
// This avoids unnecessary downloads and potential conflicts when the library is included as a
// module dependency in an application project.
if (project == rootProject) {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
}
}
}

Expand Down

0 comments on commit d81ec84

Please sign in to comment.