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

fixes #174 
fixes #184 
fixes #245
This commit is contained in:
Thibault Malbranche 2019-01-18 16:41:52 +01:00 committed by GitHub
parent 245120df0c
commit 518003392a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,7 @@ apply plugin: 'kotlin-android'
def DEFAULT_TARGET_SDK_VERSION = 27
def DEFAULT_COMPILE_SDK_VERSION = 27
def DEFAULT_BUILD_TOOLS_VERSION = "28.0.3"
def DEFAULT_SUPPORT_LIB_VERSION = "28.0.0"
def getExtOrDefault(name, defaultValue) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : defaultValue
@ -48,6 +49,7 @@ android {
repositories {
mavenCentral()
jcenter()
google()
def found = false
def defaultDir = null
@ -115,8 +117,11 @@ repositories {
}
}
def support_version = getExtOrDefault('supportLibVersion', DEFAULT_SUPPORT_LIB_VERSION)
dependencies {
//noinspection GradleDynamicVersion
api 'com.facebook.react:react-native:+'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "com.android.support:appcompat-v7:$support_version"
}