Skip to content

Commit 6a2a132

Browse files
SaeedZhianyfkotsian
authored andcommitted
Update build.gradle (#101)
* Update build.gradle Load Android Gradle Plugin conditionally and change 'compile' to 'implementation' * Update build.gradle revert changes `implementation` to `compile` due to breaking change.
1 parent 4728ac7 commit 6a2a132

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

android/build.gradle

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@ def safeExtGet(prop, fallback) {
33
}
44

55
buildscript {
6-
repositories {
7-
google()
8-
jcenter()
9-
}
6+
// The Android Gradle plugin is only required when opening the android folder stand-alone.
7+
// This avoids unnecessary downloads and potential conflicts when the library is included as a
8+
// module dependency in an application project.
9+
if (project == rootProject) {
10+
repositories {
11+
google()
12+
jcenter()
13+
}
1014

11-
dependencies {
12-
classpath("com.android.tools.build:gradle:3.4.1")
15+
dependencies {
16+
classpath("com.android.tools.build:gradle:3.5.1")
17+
}
1318
}
1419
}
1520

0 commit comments

Comments
 (0)