apply plugin: 'com.android.application'

android {
    //ndkVersion "20.0.5594570"
    compileSdkVersion 29
    buildToolsVersion "29.0.3"
    defaultConfig {
        applicationId "com.byteflow.learnffmpeg"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        ndk {
            abiFilters "arm64-v8a", "armeabi-v7a"
            //abiFilters "armeabi-v7a"
        }

        externalNativeBuild {
            cmake {
                //cppFlags '-std=c++11'
                arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_ARM_MODE=arm', '-DANDROID_STL=c++_static'
                cFlags "-ferror-limit=0 -fPIC"
                cppFlags "-std=c++11 -frtti -fexceptions"
            }
        }


    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    externalNativeBuild {
        cmake {
            path file('src/main/cpp/CMakeLists.txt')
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.2'
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:26.0.0-alpha1'
    //noinspection GradleCompatible
    implementation 'com.android.support:design:26.0.0-alpha1'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
