plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
}

android {
    namespace 'fr.angel.dynamicisland'
    compileSdk 34

    defaultConfig {
        applicationId "fr.angel.dynamicisland"
        minSdk 31
        targetSdk 34
        versionCode 5
        versionName '1.0.4'

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

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    buildFeatures {
        compose true
    }
    composeOptions {
        kotlinCompilerExtensionVersion '1.4.3'
    }
    packagingOptions {
        resources {
            excludes += '/META-INF/{AL2.0,LGPL2.1}'
        }
    }
}

dependencies {

    // Compose
    implementation platform('androidx.compose:compose-bom:2023.05.01')
    implementation 'androidx.compose.ui:ui'
    implementation 'androidx.compose.ui:ui-graphics'
    implementation 'androidx.compose.ui:ui-tooling-preview'
    // Override BOM version to get the below alpha version of Material3 components (used by: ModalBottomSheet)
    implementation 'androidx.compose.material3:material3:1.2.0-alpha08'
    implementation 'androidx.compose.material:material-icons-extended'
    implementation "androidx.compose.ui:ui-text-google-fonts"
    implementation "androidx.compose.runtime:runtime-livedata"

    // Additional Compose dependencies
    implementation 'androidx.constraintlayout:constraintlayout-compose:1.0.1'
    implementation 'androidx.compose.material:material:1.5.1'
    implementation 'androidx.navigation:navigation-compose:2.7.3'

    // Firebase
    implementation platform('com.google.firebase:firebase-bom:32.1.0')
    implementation 'com.google.firebase:firebase-auth-ktx'
    implementation 'com.google.firebase:firebase-firestore-ktx'

    // Accompanist
    var accompanist_version = '0.30.1'
    implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version"
    implementation "com.google.accompanist:accompanist-placeholder-material:$accompanist_version"
    implementation "com.google.accompanist:accompanist-flowlayout:$accompanist_version"
    implementation "com.google.accompanist:accompanist-webview:$accompanist_version"
    implementation "com.google.accompanist:accompanist-navigation-animation:0.31.3-beta"

    // Landscapist
    implementation 'com.github.skydoves:landscapist-bom:2.2.2'
    implementation "com.github.skydoves:landscapist-glide"
    implementation "com.github.skydoves:landscapist-palette"
    implementation "com.github.skydoves:landscapist-animation"

    // Other
    implementation 'androidx.core:core-splashscreen:1.0.1' // Splash screen
    implementation 'io.coil-kt:coil-compose:2.4.0' // Image loading
    implementation 'com.google.code.gson:gson:2.10.1' // Serialization / Deserialization
    implementation "com.airbnb.android:lottie-compose:6.0.1" // Animations
    implementation 'com.github.vitaviva:ComposeWaveLoading:0.1.4' // Wave animation: https://github.com/vitaviva/ComposeWaveLoading

    // Compose Tests
    androidTestImplementation platform('androidx.compose:compose-bom:2023.05.01')
    androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
    debugImplementation 'androidx.compose.ui:ui-tooling'
    debugImplementation 'androidx.compose.ui:ui-test-manifest'

    implementation 'androidx.core:core-ktx:1.12.0'
    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'
    implementation 'androidx.activity:activity-compose:1.7.2'

    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    //implementation 'com.google.android.gms:play-services-auth:20.5.0'
}