Browse Source

fix(gradle): Add support library as a dependency (#253)

fixes #174 
fixes #184 
fixes #245
Thibault Malbranche 5 years ago
parent
commit
518003392a
No account linked to committer's email address
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      android/build.gradle

+ 5
- 0
android/build.gradle View File

@@ -17,6 +17,7 @@ apply plugin: 'kotlin-android'
17 17
 def DEFAULT_TARGET_SDK_VERSION = 27
18 18
 def DEFAULT_COMPILE_SDK_VERSION = 27
19 19
 def DEFAULT_BUILD_TOOLS_VERSION = "28.0.3"
20
+def DEFAULT_SUPPORT_LIB_VERSION = "28.0.0"
20 21
 
21 22
 def getExtOrDefault(name, defaultValue) {
22 23
   return rootProject.ext.has(name) ? rootProject.ext.get(name) : defaultValue
@@ -48,6 +49,7 @@ android {
48 49
 repositories {
49 50
   mavenCentral()
50 51
   jcenter()
52
+  google()
51 53
 
52 54
   def found = false
53 55
   def defaultDir = null
@@ -115,8 +117,11 @@ repositories {
115 117
   }
116 118
 }
117 119
 
120
+def support_version = getExtOrDefault('supportLibVersion', DEFAULT_SUPPORT_LIB_VERSION)
121
+
118 122
 dependencies {
119 123
   //noinspection GradleDynamicVersion
120 124
   api 'com.facebook.react:react-native:+'
121 125
   implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
126
+  implementation "com.android.support:appcompat-v7:$support_version"
122 127
 }