plugins {
    id 'com.android.library'
}

android {
    compileSdk 31

    defaultConfig {
        minSdk 19
        targetSdk 31
        versionCode 1
        versionName "1.0"
        consumerProguardFiles "consumer-rules.pro"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        externalNativeBuild {
            cmake {
                abiFilters 'arm64-v8a','armeabi-v7a'
                cppFlags '-std=c++14 -DANDROID -fno-rtti'
                arguments = ['-DANDROID_TOOLCHAIN=clang','-DANDROID_STL=c++_shared','-DCMAKE_BUILD_TYPE=Release']
            }
        }
    }

    buildTypes {
        release {
            minifyEnabled true
        }
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    externalNativeBuild {
        cmake {
            path "src/main/cpp/CMakeLists.txt"
            version "3.10.2"
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    ndkVersion '20.0.5594570'

}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
    testImplementation 'junit:junit:4.+'
}