plugins {
    id 'com.android.library'
}

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion
    ndkVersion rootProject.ext.ndkVersion

    defaultConfig {
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"

        consumerProguardFiles 'lib-proguard-rules.pro'

        externalNativeBuild {
            cmake {
                abiFilters rootProject.ext.abiFilters.split(",")
                arguments "-DANDROID_STL=none"
                cppFlags "-nostdinc++ -fno-exceptions"
            }
        }
    }

    buildTypes {
        debug {
            ndk {
                abiFilters rootProject.ext.abiFilters.split(",")
            }
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            ndk {
                abiFilters rootProject.ext.abiFilters.split(",")
            }
        }
    }
    externalNativeBuild {
        cmake {
            path "src/main/cpp/CMakeLists.txt"
            version rootProject.ext.cmakeVersion
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}

apply from: rootProject.file('gradle/publish.gradle')