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

android {
    compileSdk 36
    
    buildFeatures {
        buildConfig = true
    }

    defaultConfig {
        minSdk 21
        targetSdk 33

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        consumerProguardFiles "consumer-rules.pro"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            buildConfigField "int", "SHIZUKU_VERSION_CODE", "1"
        }
        debug {
            buildConfigField "int", "SHIZUKU_VERSION_CODE", "1"
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_19
        targetCompatibility JavaVersion.VERSION_19
    }
    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_19
    }
    namespace 'net.xzos.upgradeall.core.installer'
}

dependencies {

    implementation project(path: ':core-utils')
    implementation project(path: ':core-android-utils')  // 权限请求
    implementation project(path: ':core-shell')  // Root 安装器

    implementation "androidx.core:core-ktx:$android_ktx_version"
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.3.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'

    // DocumentFile
    implementation "androidx.documentfile:documentfile:1.1.0"

    // Shizuku
    def shizuku_version = '13.1.5'
    implementation "dev.rikka.shizuku:api:$shizuku_version"
    // add this if you want to support Shizuku
    implementation "dev.rikka.shizuku:provider:$shizuku_version"
    api 'org.lsposed.hiddenapibypass:hiddenapibypass:6.1'

}