feat(android): Load Android Gradle Plugin conditionally (#2623)
This commit is contained in:
parent
1f8b863947
commit
d8cf6c9c10
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user