apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.alibaba.android.bindingx.playground.react"
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        // Got problem:
        // dlopen failed: libgnustl_shared.so is 32-bit instead of 64-bit
        // https://github.com/facebook/react-native/issues/11027
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')

    implementation project(path: ':bindingx-core')
    implementation project(path: ':bindingx_react-native_plugin')
    implementation 'com.facebook.react:react-native:+' //from node_modules

    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:support-v4:26.1.0'
    implementation 'com.android.support:support-annotations:26.1.0'
}

if(file('../../../../LICENSE.md').exists() && plugins.hasPlugin("com.github.hierynomus.license")){
    license {
        header = file('../../../../LICENSE.md')
    }
    preBuild.dependsOn licenseFormat
}