plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'kotlin-kapt'
    id 'dagger.hilt.android.plugin'
    id("kotlin-parcelize")
    id("androidx.room")
}



android {
    namespace 'llc.arma.ble'
    compileSdk 34

    defaultConfig {
        applicationId "llc.arma.ble"
        minSdk 26
        targetSdk 34
        versionCode 39
        versionName "1.4.9"

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

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

    applicationVariants.configureEach { variant ->
        variant.outputs.configureEach {
            outputFileName = "Arma BLE v${defaultConfig.versionName}.apk"
        }
    }

    room {
        schemaDirectory("$projectDir/schemas")
    }

}

dependencies {

    implementation 'androidx.core:core-ktx:1.13.1'
    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
    implementation 'androidx.lifecycle:lifecycle-runtime-compose:2.7.0-alpha01'
    implementation 'androidx.activity:activity-compose:1.7.2'
    implementation "androidx.compose.ui:ui:1.5.0-beta01"
    implementation "androidx.compose.ui:ui-tooling-preview:1.5.0-beta01"
    implementation 'androidx.compose.material3:material3:1.2.0-alpha02'
    implementation 'androidx.compose.material:material:1.5.0-beta01'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.5.0-beta01"
    debugImplementation "androidx.compose.ui:ui-tooling:1.5.0-beta01"
    debugImplementation "androidx.compose.ui:ui-test-manifest:1.5.0-beta01"

    implementation "androidx.compose.material:material-icons-extended:1.5.0-beta01"

    implementation 'androidx.core:core-splashscreen:1.0.1'
    implementation 'androidx.navigation:navigation-compose:2.5.3'

    implementation("androidx.hilt:hilt-navigation-compose:1.2.0")
    implementation('com.google.dagger:hilt-android:2.46')
    kapt('com.google.dagger:hilt-android-compiler:2.46')
    kapt("androidx.hilt:hilt-compiler:1.2.0")

    implementation 'no.nordicsemi.android.kotlin.ble:scanner:1.0.14'
    implementation 'no.nordicsemi.android.kotlin.ble:client:1.0.14'

    implementation "com.google.accompanist:accompanist-permissions:0.26.3-beta"

    implementation "com.patrykandpatrick.vico:core:1.7.1"
    implementation "com.patrykandpatrick.vico:compose:1.7.1"
    implementation "com.patrykandpatrick.vico:compose-m3:1.7.1"

    implementation "androidx.room:room-runtime:2.6.1"
    kapt("androidx.room:room-compiler:2.6.1")
    implementation("androidx.room:room-ktx:2.6.1")

    implementation files('libs/poishadow-all.jar')

}