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

android {
    compileSdkVersion 33

    defaultConfig {
        applicationId "flwr.android_client"
        // API level 14+ is required for TLS since Google Play Services v10.2
        minSdkVersion 24
        targetSdkVersion 33
        versionCode 1
        versionName "1.0"

        javaCompileOptions {
            annotationProcessorOptions {
                // Tell Room where to export schema so it can generate auto-migrations.
                arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
            }
        }
    }
    buildTypes {
        debug { minifyEnabled false }
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }


    dataBinding {
        enabled = true
    }


    namespace 'flwr.android_client'
    lint {
        disable 'GoogleAppIndexingWarning', 'HardcodedText', 'InvalidPackage'
        textOutput file('stdout')
        textReport true
    }
}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.core:core-ktx:1.10.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test:runner:1.5.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    // Room.
    def room_version = '2.5.2'
    implementation("androidx.room:room-runtime:$room_version")
    kapt("androidx.room:room-compiler:$room_version")
    implementation("androidx.room:room-ktx:$room_version")
    testImplementation("androidx.room:room-testing:$room_version")

    // Local dependencies.
    implementation project(path: ':flower_tflite')

    implementation 'com.google.android.material:material:1.9.0'
}
