plugins {
    alias(libs.plugins.android.application)
}

android {
    namespace 'org.modfs.xposedmenu'
    compileSdk 34

    defaultConfig {
        applicationId "org.modfs.xposedmenu"
        minSdk 28
        targetSdk 34
        versionCode 1
        versionName "1.0"

        ndk {
            // SET THIS TO THE ABI YOU WILL USE, DELETE THE OTHERS
            abiFilters 'arm64-v8a', 'x86_64', 'armeabi-v7a', 'x86'
        }


        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        externalNativeBuild {
            cmake {
                cppFlags '-std=c++20' // Required by BNM
            }
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    externalNativeBuild {
        cmake {
            path file('src/main/cpp/CMakeLists.txt')
            version '3.22.1'
        }
    }

    buildFeatures {
        viewBinding true
    }

    androidResources {
        noCompress 'so'
    }

    ndkVersion '25.2.9519653'
}

dependencies {

    implementation libs.appcompat
    implementation libs.material
    implementation libs.constraintlayout
    testImplementation libs.junit
    androidTestImplementation libs.ext.junit
    androidTestImplementation libs.espresso.core
    compileOnly libs.api

}