apply plugin: 'com.android.library'

android {
    compileSdkVersion 26

    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        externalNativeBuild {
            cmake {
                //'-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=gnustl_static'此两项是系统默认的，不用配置也可，
                //'-DANDROID_PLATFORM=android-21'官方建议配置minSdkVersion即可
                //详细可见https://developer.android.google.cn/ndk/guides/cmake.html
                //arguments '-DANDROID_PLATFORM=android-21', '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=gnustl_static'
                cppFlags "-frtti -fexceptions -Wno-error=format-security -Wmacro-redefined"
            }
        }
        ndk {
            abiFilters "armeabi"
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    externalNativeBuild {
        cmake {
            path "src/main/cpp/CMakeLists.txt"
        }
    }
    //解决升级gradle4后so重复的问题
    packagingOptions {
        pickFirst 'lib/armeabi/libframeutil.so'
    }
}

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