mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-05 07:59:28 +00:00
Refactored Gradle setup
- moved safeExtGet to out of `buildscript` block, because it's no longer needed to be there (previously we needed it there for getting AGP version from root project)
- bumped AGP version to 3.5.3
- replace `${safeExtGet('reactnativeVersion', '+')}` with `+`, becase react-native version automatically resolved by npm and it does not need to handle using `safeExtGet`
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
buildscript {
|
||||
ext.safeExtGet = {prop, fallback ->
|
||||
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
||||
}
|
||||
|
||||
// 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.
|
||||
@@ -13,14 +9,17 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
//noinspection GradleDependency
|
||||
classpath("com.android.tools.build:gradle:3.5.1")
|
||||
classpath("com.android.tools.build:gradle:3.5.3")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
def safeExtGet(prop, fallback) {
|
||||
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion safeExtGet('compileSdkVersion', 28)
|
||||
//noinspection GradleDependency
|
||||
@@ -48,5 +47,5 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
//noinspection GradleDynamicVersion
|
||||
implementation "com.facebook.react:react-native:${safeExtGet('reactnativeVersion', '+')}"
|
||||
implementation "com.facebook.react:react-native:+"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user