Setup dynamic version for Android SDK

This patch sets a dynamic version, based on `rootProject`, for
Android SDK and React Native.
This commit is contained in:
Uilque Messias 2017-10-31 19:08:33 -02:00
parent 19335d4b42
commit 65ba2dd42a
1 changed files with 11 additions and 5 deletions

View File

@ -10,13 +10,19 @@ buildscript {
apply plugin: 'com.android.library'
def _reactNativeVersion = rootProject.ext.reactNative ?: '+';
def _compileSdkVersion = rootProject.ext.compileSdkVersion ?: 26;
def _buildToolsVersion = rootProject.ext.buildToolsVersion ?: '26.0.1';
def _minSdkVersion = rootProject.ext.minSdkVersion ?: 16;
def _targetSdkVersion = rootProject.ext.targetSdkVersion ?: 26;
android {
compileSdkVersion 26
buildToolsVersion '26.0.1'
compileSdkVersion _compileSdkVersion
buildToolsVersion _buildToolsVersion
defaultConfig {
minSdkVersion 16
targetSdkVersion 26
minSdkVersion _minSdkVersion
targetSdkVersion _targetSdkVersion
versionCode 1
versionName "1.0"
}
@ -27,5 +33,5 @@ android {
dependencies {
//noinspection GradleDynamicVersion
provided 'com.facebook.react:react-native:' + project.ext.reactNative
provided "com.facebook.react:react-native:${_reactNativeVersion}"
}