plugins {
    id 'com.android.application'
}

android {
    namespace 'com.fourtwo.hookintent'
    compileSdk 33

    defaultConfig {
        applicationId "com.fourtwo.hookintent"
        minSdk 24
        versionCode
        versionName "1.5.1"

        multiDexEnabled true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

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

    buildFeatures {
        viewBinding true
    }
    sourceSets {
        main {
            aidl.srcDirs = ['src/main/aidl']
            res.srcDirs = ['src/main/res']

            assets {
                srcDirs 'src\\main\\assets'
            }
        }
    }
    buildFeatures {
        aidl true
    }
}

dependencies {
    compileOnly project(path: ':hiddenapi')

    implementation "org.lsposed.hiddenapibypass:hiddenapibypass:4.3"

    // Root提权
    def libsu_version = '6.0.0'
    implementation "com.github.topjohnwu.libsu:core:${libsu_version}"
    implementation "com.github.topjohnwu.libsu:service:${libsu_version}"

    // ShiZuKu
    def shizuku_version = '13.1.5'
    implementation "dev.rikka.shizuku:api:${shizuku_version}"
    implementation "dev.rikka.shizuku:provider:${shizuku_version}"

    implementation 'com.squareup.okhttp3:okhttp:4.9.3'

    implementation 'io.noties.markwon:image:4.6.2'
    implementation 'io.noties.markwon:core:4.6.2'
    implementation 'io.noties.markwon:html:4.6.2'
    implementation 'io.noties.markwon:ext-tables:4.6.2'
    implementation 'io.noties.markwon:ext-tasklist:4.6.2'

    implementation 'androidx.recyclerview:recyclerview:1.2.1'
    implementation 'androidx.appcompat:appcompat:1.5.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
    implementation 'androidx.navigation:navigation-fragment:2.5.2'
    implementation 'androidx.navigation:navigation-ui:2.5.2'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.preference:preference:1.2.0'
    implementation 'com.caverock:androidsvg:1.4'
//    testImplementation 'junit:junit:4.13.2'
//    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
//    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

    implementation 'androidx.multidex:multidex:2.0.1'

    // UI控件
    implementation 'com.google.android.material:material:1.7.0'
    implementation 'com.github.yukuku:ambilwarna:2.0.1'
    implementation 'com.github.zcweng:switch-button:0.0.3@aar'

    compileOnly fileTree(include: ['.jar'], dir: 'libs')
    compileOnly files('libs/XposedBridgeAPI-89.jar')
}