diff --git a/android/build.gradle b/android/build.gradle index 849e79a..2614c62 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,36 +1,26 @@ +apply plugin: 'com.android.library' -buildscript { - repositories { - jcenter() - } +def _ext = rootProject.ext - dependencies { - classpath 'com.android.tools.build:gradle:1.3.1' - } -} - -apply plugin: 'com.android.library' +def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 26 +def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion : '26.0.3' +def _minSdkVersion = _ext.has('minSdkVersion') ? _ext.minSdkVersion : 16 +def _targetSdkVersion = _ext.has('targetSdkVersion') ? _ext.targetSdkVersion : 26 android { - compileSdkVersion 26 - buildToolsVersion "26.0.3" + compileSdkVersion _compileSdkVersion + buildToolsVersion _buildToolsVersion - defaultConfig { - minSdkVersion 16 - targetSdkVersion 22 - versionCode 1 - versionName "1.0" - } - lintOptions { - abortOnError false - } -} + defaultConfig { + minSdkVersion _minSdkVersion + targetSdkVersion _targetSdkVersion + } -repositories { - mavenCentral() + lintOptions { + abortOnError false + } } dependencies { - compile 'com.facebook.react:react-native:+' + compile "com.facebook.react:react-native:+" // From node_modules } - \ No newline at end of file