plugins {
    alias(libs.plugins.android.application)
}

android {

    namespace = "com.example.projekta"
    compileSdk = 36

    defaultConfig {

        applicationId = "com.example.projekta"
        minSdk = 24
        targetSdk = 33

        versionCode = 1
        versionName = "1.0"

        testInstrumentationRunner =
            "androidx.test.runner.AndroidJUnitRunner"
    }

    packaging {
        resources {
            excludes += setOf(
                "META-INF/INDEX.LIST",
                "META-INF/DEPENDENCIES",
                "META-INF/io.netty.versions.properties",
                "META-INF/LICENSE*",
                "META-INF/NOTICE*"
            )
        }
    }

    buildTypes {

        release {

            isMinifyEnabled = false

            proguardFiles(
                getDefaultProguardFile(
                    "proguard-android-optimize.txt"
                ),
                "proguard-rules.pro"
            )
        }
    }

    compileOptions {

        sourceCompatibility =
            JavaVersion.VERSION_11

        targetCompatibility =
            JavaVersion.VERSION_11
    }

    buildFeatures {

        viewBinding = true
    }
}

dependencies {

    // ANDROID
    implementation(libs.androidx.core.ktx)
    implementation(libs.androidx.appcompat)
    implementation(libs.material)
    implementation(libs.androidx.activity)
    implementation(libs.androidx.constraintlayout)

    // RECYCLERVIEW
    implementation(
        "androidx.recyclerview:recyclerview:1.3.2"
    )

    // CIRCLE IMAGE
    implementation(
        "de.hdodenhof:circleimageview:3.1.0"
    )

    // IMAGE LOADER
    implementation(
        "io.coil-kt:coil:2.6.0"
    )

    // VOLLEY
    implementation(
        "com.android.volley:volley:1.2.1"
    )

    // SPLASH SCREEN
    implementation(
        "androidx.core:core-splashscreen:1.0.1"
    )

    // MQTT
    implementation("com.hivemq:hivemq-mqtt-client:1.3.3")

    // TEST
    testImplementation(libs.junit)

    androidTestImplementation(
        libs.androidx.junit
    )

    androidTestImplementation(
        libs.androidx.espresso.core
    )
}