Skip to content

Commit

Permalink
Fix Android build on RN 0.57.0:
Browse files Browse the repository at this point in the history
- Use gradle project settings to set versions
- Allow a custom accountKitSdkVersion from project settings
- Update account-kit to the latest version
  • Loading branch information
jpgarcia committed Sep 18, 2018
1 parent d46b7bc commit 0d06f49
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
apply plugin: 'com.android.library'

def DEFAULT_COMPILE_SDK_VERSION = 27
def DEFAULT_BUILD_TOOLS_VERSION = "27.0.3"
def DEFAULT_MIN_SDK_VERSION = 16
def DEFAULT_TARGET_SDK_VERSION = 26
def DEFAULT_SUPPORT_LIB_VERSION = "27.1.1"
def DEFAULT_ACCOUNT_KIT_VERSION = "4.36.0"

def SUPPORT_LIB_VERSION = rootProject.hasProperty('supportLibVersion') ? rootProject.supportLibVersion : DEFAULT_SUPPORT_LIB_VERSION
def ACCOUNT_KIT_VERSION = rootProject.hasProperty('accountKitSdkVersion') ? rootProject.accountKitSdkVersion : DEFAULT_ACCOUNT_KIT_VERSION


android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION

defaultConfig {
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
minSdkVersion rootProject.hasProperty('minSdkVersion') ? rootProject.minSdkVersion : DEFAULT_MIN_SDK_VERSION
targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
}

buildTypes {
release {
minifyEnabled false
Expand All @@ -19,8 +29,10 @@ android {
}

dependencies {
compile 'com.facebook.react:react-native:+'
compile ('com.facebook.android:account-kit-sdk:4.23.0'){
implementation 'com.facebook.react:react-native:+'
implementation "com.android.support:appcompat-v7:${SUPPORT_LIB_VERSION}"
implementation "com.android.support:design:${SUPPORT_LIB_VERSION}"
implementation ("com.facebook.android:account-kit-sdk:${ACCOUNT_KIT_VERSION}"){
exclude group: 'com.parse.bolts', module: 'bolts-android';
exclude group: 'com.parse.bolts', module: 'bolts-applinks';
exclude group: 'com.parse.bolts', module: 'bolts-tasks';
Expand Down

0 comments on commit 0d06f49

Please sign in to comment.