feat(android): Load Android Gradle Plugin conditionally (#2623)

This commit is contained in:
SaeedZhiany 2019-12-03 22:39:23 +03:30 committed by Sibelius Seraphini
parent 1f8b863947
commit d8cf6c9c10

View File

@ -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")
}
}
}