plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'org.jetbrains.kotlin.plugin.compose'
    id 'kotlinx-serialization'
}

android {
    namespace 'com.eiyooooo.autorotate'
    compileSdk 35

    defaultConfig {
        applicationId 'com.eiyooooo.autorotate'
        minSdk 24
        targetSdk 35
        versionCode 3
        versionName "1.1.0"
    }

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

    buildFeatures {
        aidl true
        buildConfig true
        compose true
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    kotlinOptions {
        jvmTarget = '17'
    }
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.1'

    implementation 'androidx.core:core-ktx:1.16.0'
    implementation 'androidx.appcompat:appcompat:1.7.1'
    implementation 'androidx.preference:preference-ktx:1.2.1'
    implementation 'androidx.fragment:fragment-ktx:1.8.8'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.1'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.9.1'
    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.9.1'

    implementation 'androidx.compose.material3:material3:1.3.2'
    implementation 'androidx.compose.material:material-icons-extended:1.7.8'
    implementation 'androidx.compose.ui:ui-tooling-preview:1.8.2'
    debugImplementation 'androidx.compose.ui:ui-tooling:1.8.2'

    implementation 'androidx.activity:activity-compose:1.10.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.9.1'
    implementation "androidx.navigation:navigation-compose:2.9.0"
    implementation 'androidx.compose.runtime:runtime-livedata:1.8.2'
    implementation "androidx.compose.material3:material3-window-size-class:1.3.2"

    implementation 'com.jakewharton.timber:timber:5.0.1'
    implementation 'com.fredporciuncula:flow-preferences:1.9.1'
    implementation 'androidx.datastore:datastore-preferences:1.1.7'
    implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3'

    implementation 'org.lsposed.hiddenapibypass:hiddenapibypass:4.3'
    implementation "dev.rikka.shizuku:api:13.1.5"
    implementation "dev.rikka.shizuku:provider:13.1.5"
}