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

android {
    namespace = "com.birdsounds.identify"
    compileSdk = 34

    defaultConfig {
        applicationId = "com.birdsounds.identify"
        minSdk = 34
        targetSdk = 34
        versionCode = 1
        versionName = "1.0"

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

    buildTypes {
        release {
            isMinifyEnabled = 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
    }
}

dependencies {
    api(fileTree("libs") {
        include("*.jar")
    })
    api(files("libs/opus.aar"))
    implementation(libs.androidx.core.ktx)
    implementation(libs.androidx.appcompat)
    implementation(libs.play.services.wearable)
    implementation(libs.material)
    implementation(libs.androidx.activity)
    implementation(libs.androidx.constraintlayout)
    implementation(libs.androidx.work.runtime.ktx)
//    implementation("org.tensorflow:tensorflow-lite-task-vision")
//    implementation("org.tensorflow:tensorflow-lite-gpu-delegate-plugin")
    implementation(libs.androidx.lifecycle.runtime.ktx)
    implementation(libs.androidx.activity.compose)
    implementation(platform(libs.androidx.compose.bom))
    implementation(libs.androidx.ui)
    implementation("io.github.nailik:androidresampler:0.1")
//        implementation("org.tensorflow:tensorflow-lite:1.12.0")
    implementation("org.tensorflow:tensorflow-lite:2.16.1")
        implementation("org.tensorflow:tensorflow-lite-task-vision:0.4.4")

    implementation("androidx.datastore:datastore-preferences:1.1.3")
//    implementation("org.tensorflow:tensorflow-lite:2.6.0")
//    implementation("com.google.android.gms:play-services-tflite:20.0.0")
    implementation("uk.me.berndporr:iirj:1.7")
    implementation(libs.androidx.ui.graphics)
    implementation(libs.androidx.ui.tooling.preview)
    implementation(libs.androidx.material3)
    implementation(libs.androidx.datastore.core.android)
    implementation(libs.core.ktx)
//    implementation(libs.litert.support.api)
//    implementation(libs.litert)
//    implementation(libs.litert)
    testImplementation(libs.junit)
    androidTestImplementation(libs.androidx.junit)
    androidTestImplementation(libs.androidx.espresso.core)
    androidTestImplementation(platform(libs.androidx.compose.bom))
    androidTestImplementation(libs.androidx.ui.test.junit4)
    debugImplementation(libs.androidx.ui.tooling)
    debugImplementation(libs.androidx.ui.test.manifest)
    wearApp(project(":wear"))
}