Use project-wide properties and new dependency (#771)

* Support for gradle 3.+
This commit is contained in:
Carlos Q 2018-07-19 23:11:00 +02:00 committed by Ivan Pusic
parent 097956b288
commit 7e94458c41

View File

@ -1,12 +1,17 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
def DEFAULT_COMPILE_SDK_VERSION = 27
def DEFAULT_BUILD_TOOLS_VERSION = "27.0.3"
def DEFAULT_TARGET_SDK_VERSION = 27
def DEFAULT_MIN_SDK_VERSION = 16
defaultConfig {
minSdkVersion 16
targetSdkVersion 27
android {
compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
defaultConfig {
minSdkVersion rootProject.hasProperty('minSdkVersion') ? rootProject.minSdkVersion : DEFAULT_MIN_SDK_VERSION
targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
versionCode 1
}
lintOptions {
@ -15,7 +20,7 @@ android {
}
dependencies {
compile 'com.facebook.react:react-native:+'
compile 'com.github.yalantis:ucrop:2.2.2-native'
compile 'id.zelory:compressor:2.1.0'
implementation 'com.facebook.react:react-native:+'
implementation 'com.github.yalantis:ucrop:2.2.2-native'
implementation 'id.zelory:compressor:2.1.0'
}