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

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "com.tsng.fuckdmzj"
        minSdkVersion 22
        targetSdkVersion 30
        versionCode 4
        versionName "1.3"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    android.applicationVariants.all {
        variant ->
            if (variant.buildType.name != "debug")
                variant.outputs.all {
                    variant.getPackageApplication().outputDirectory = new File("release")
                    outputFileName = "V${variant.versionName}.apk"
                }
    }

    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            zipAlignEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    aaptOptions {
        additionalParameters '--allow-reserved-package-id', '--package-id', '0x64'
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {
    implementation 'com.github.kyuubiran:EzXHelper:0.3.2'

    implementation 'androidx.preference:preference-ktx:1.1.1'
    implementation 'com.google.android.material:material:1.4.0'

    implementation "com.squareup.okhttp3:okhttp:4.9.1"
    implementation "com.google.code.gson:gson:2.8.7"

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    compileOnly 'de.robv.android.xposed:api:82'
    compileOnly 'de.robv.android.xposed:api:82:sources'
}