浏览代码

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

fixes #174 
fixes #184 
fixes #245
Thibault Malbranche 6 年前
父节点
当前提交
518003392a
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5
    0
      android/build.gradle

+ 5
- 0
android/build.gradle 查看文件

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