apply plugin: 'com.android.library'
apply from: rootDir.toString() + '/build_aar.gradle'

android {
    compileSdkVersion project.compileSdkVersion
    buildToolsVersion project.buildToolsVersion


    defaultConfig {
        minSdkVersion project.libMinSdkVersion
        targetSdkVersion project.targetSdkVersion
        versionName project.versionName
        versionCode project.versionCode

        externalNativeBuild {
            cmake {
                cppFlags "-frtti", "-fexceptions", "-std=c++11", "-fvisibility=hidden", "-Wall"
                arguments "-DANDROID_PLATFORM=android-16" // 指定ndk的platform
                arguments "-DANDROID_TOOLCHAIN=clang" // 使用clang
                arguments "-DANDROID_STL=c++_shared"
            }
        }

        ndk {
            abiFilters project.ndk_abiFilters_project.split(",")
            stl "stlport_static"
        }
    }

    externalNativeBuild {
        cmake {
            path "src/main/cpp/CMakeLists.txt"
            version project.cmake_version
        }
    }

    buildTypes {
        release {
            minifyEnabled false
        }
    }
    lintOptions {
        abortOnError false
    }
}