Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Commit

Permalink
feat(android): Load Android Gradle Plugin conditionally (#2623)
Browse files Browse the repository at this point in the history
  • Loading branch information
SaeedZhiany authored and sibelius committed Dec 3, 2019
1 parent 1f8b863 commit d8cf6c9
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@ def safeExtGet(prop, fallback) {
}

buildscript {
repositories {
google()
jcenter()
}
// 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.2'
dependencies {
//noinspection GradleDependency
classpath("com.android.tools.build:gradle:3.5.2")
}
}
}

Expand Down

0 comments on commit d8cf6c9

Please sign in to comment.