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

android {
    compileSdk 34
    namespace "com.lin.comlauncher"
    defaultConfig {
        applicationId "com.lin.comlauncher"
        minSdk 23
        targetSdk 34
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables {
            useSupportLibrary true
        }
    }

    signingConfigs {
        release {
            storeFile file("key.jks")
            storePassword "123456"
            keyAlias "key0"
            keyPassword "123456"
            v2SigningEnabled true

        }
        debug {
            storeFile file("key.jks")
            storePassword "123456"
            keyAlias "key0"
            keyPassword "123456"
        }
    }

    buildTypes {
        release {
            minifyEnabled true
            signingConfig signingConfigs.release
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        debug{
            signingConfig signingConfigs.debug
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'

    }
    buildFeatures {
        compose true
    }
    composeOptions {
        com.android.build.gradle.internal.utils.KgpUtils
        kotlinCompilerExtensionVersion '1.5.10'
    }
    packagingOptions {
        resources {
            excludes += '/META-INF/{AL2.0,LGPL2.1}'
        }
    }
}

dependencies {
    def composeBom = platform('androidx.compose:compose-bom:2024.02.00')
    implementation composeBom

    implementation 'androidx.core:core-ktx:1.9.22'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.8.0'
    implementation "androidx.compose.ui:ui"
    implementation "androidx.compose.material:material"

    // Android Studio Preview support
    implementation 'androidx.compose.ui:ui-tooling-preview'
    debugImplementation 'androidx.compose.ui:ui-tooling'

// Optional - Integration with activities
    implementation 'androidx.activity:activity-compose:1.8.2'
    // Optional - Integration with ViewModels
    implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1'
    // Optional - Integration with LiveData
    implementation 'androidx.compose.runtime:runtime-livedata'

    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
    // 基础依赖包，必须要依赖
    implementation 'com.gyf.immersionbar:immersionbar:3.0.0'
// kotlin扩展（可选）
    implementation 'com.gyf.immersionbar:immersionbar-ktx:3.0.0'

    implementation("io.coil-kt:coil-compose:2.1.0")
}