apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "sq.rogue.rosettadrone"
        minSdkVersion 23
        targetSdkVersion 27
        versionCode 1
        versionName "1.2.1"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions{
        exclude 'META-INF/rxjava.properties'
    }

    sourceSets {
        main {
            jniLibs.srcDirs = ['src/main/cpp/lib']
        }
    }

    packagingOptions {
        doNotStrip "*/*/libdjivideo.so"
        doNotStrip "*/*/libSDKRelativeJNI.so"
        doNotStrip "*/*/libFlyForbid.so"
        doNotStrip "*/*/libduml_vision_bokeh.so"
        doNotStrip "*/*/libyuv2.so"
        doNotStrip "*/*/libGroudStation.so"
        doNotStrip "*/*/libFRCorkscrew.so"
        doNotStrip "*/*/libUpgradeVerify.so"
        doNotStrip "*/*/libFR.so"
    }
    externalNativeBuild {
        cmake {
            path 'CMakeLists.txt'
        }
    }
    defaultConfig {
        ndk {
            abiFilters 'armeabi-v7a' // more could be added
        }
    }

}
dependencies {
    //    debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
    //    releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:preference-v7:27.1.1'
    implementation 'com.android.support:preference-v14:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation 'com.android.support:design:27.1.1'
    testImplementation 'junit:junit:4.12'
    testImplementation 'org.mockito:mockito-core:2.7.22'
    testImplementation 'org.mockito:mockito-android:2.7.22'
    implementation 'com.dji:dji-sdk:4.6'
    compileOnly 'com.dji:dji-sdk-provided:4.6'
    implementation 'com.android.support:multidex:1.0.3'
}
