mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-06 16:32:24 +00:00
Load Android Gradle Plugin conditionally
This commit is contained in:
+13
-7
@@ -2,14 +2,20 @@ buildscript {
|
|||||||
ext.safeExtGet = {prop, fallback ->
|
ext.safeExtGet = {prop, fallback ->
|
||||||
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
||||||
}
|
}
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
jcenter()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
// The Android Gradle plugin is only required when opening the android folder stand-alone.
|
||||||
//noinspection GradleDependency
|
// This avoids unnecessary downloads and potential conflicts when the library is included as a
|
||||||
classpath("com.android.tools.build:gradle:${safeExtGet('gradlePluginVersion', '3.4.1')}")
|
// module dependency in an application project.
|
||||||
|
if (project == rootProject) {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
//noinspection GradleDependency
|
||||||
|
classpath("com.android.tools.build:gradle:3.5.1")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user