plugins {
    alias(libs.plugins.androidApplication)
}

android {
    namespace 'io.github.eirv.simpleioredirect'
    compileSdk 35
    ndkVersion '29.0.13113456'

    defaultConfig {
        applicationId "io.github.eirv.simpleioredirect"
        minSdk 31
        targetSdk 35
        versionCode 1
        versionName "1.0"

        externalNativeBuild {
            cmake {
                cppFlags '-std=c++23'
                arguments += '-DANDROID_STL=none'
            }
        }
        ndk {
            abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64', 'riscv64'
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    externalNativeBuild {
        cmake {
            path 'src/main/cpp/CMakeLists.txt'
            version '3.22.1'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_11
        targetCompatibility JavaVersion.VERSION_11
    }
    packagingOptions {
        jniLibs.useLegacyPackaging true
    }
}

dependencies {
}