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

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

    defaultConfig {
        applicationId "me.zhilong.tools.abortkiller.demo"
        minSdkVersion 16
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName rootProject.ext.versionName

        externalNativeBuild {
            cmake {
                abiFilters rootProject.ext.abiFilters.split(",")
                arguments "-DANDROID_STL=c++_shared"
            }
        }
    }

    buildTypes {
        debug {
            ndk {
                abiFilters "armeabi-v7a"
            }
        }
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

            ndk {
                abiFilters "armeabi-v7a"
            }
        }
    }
    externalNativeBuild {
        cmake {
            path "src/main/cpp/CMakeLists.txt"
            version rootProject.ext.cmakeVersion
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {
    implementation project(path: ':patrons')

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.2.0'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
}