plugins {
    id 'com.android.library'
    id 'kotlin-android'
}

android {
    compileSdkVersion COMPILE_SDK_VERSION
    buildToolsVersion BUILD_TOOLS_VERSION

    defaultConfig {
        minSdkVersion MIN_SDK_VERSION
        targetSdkVersion TARGET_SDK_VERSION

        if (COMMON_LIB_DEV_ENABLE) {
            externalNativeBuild {
                cmake {
                    cppFlags '-std=c++11 -frtti -fexceptions -lz'
                    abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
                }
            }
        }
    }

    buildTypes {
        release {
            minifyEnabled MINIFY_ENABLE
            proguardFiles 'proguard-rules.pro'
        }
    }

    ndkVersion NDK_VERSION

    buildFeatures {
        buildConfig = false
    }

    lintOptions {
        abortOnError false
    }

    repositories {
        flatDir {
            dirs 'libs'
        }
    }

    dexOptions {
        preDexLibraries = false
    }

    if (COMMON_LIB_DEV_ENABLE) {
        externalNativeBuild {
            cmake {
                path "CMakeLists.txt"
            }
        }
    }
}

dependencies {
    implementation 'androidx.core:core-ktx:1.3.2'
}