apply plugin: 'com.android.application'
apply plugin: 'dagger.hilt.android.plugin'
apply plugin: 'kotlin-android'
apply plugin: "androidx.navigation.safeargs.kotlin"
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'

if (getGradle().getStartParameter().getTaskRequests().toString().contains("Release")) {
    apply plugin: 'com.google.firebase.crashlytics'
}

android {
    compileSdk 34

    defaultConfig {
        applicationId "motionapps.sensorbox"
        minSdkVersion 24
        targetSdkVersion 34
        versionCode 87
        versionName "4.3.2"
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        signingConfig signingConfigs.debug
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }

        nfrelease{
            initWith release
        }
    }



    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_17
    }
    lint {
        disable 'MissingTranslation'
    }
    namespace 'com.motionapps.sensorbox'


}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    
    implementation project(path: ':SensorServices')
    implementation project(path: ':CountDownDialog')
    implementation project(path: ':wearoslib')
    implementation project(path: ':flipper')

    implementation "androidx.multidex:multidex:2.0.1"
    implementation 'androidx.core:core-ktx:1.12.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.11.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

    implementation 'androidx.navigation:navigation-fragment-ktx:2.7.7'
    implementation 'androidx.navigation:navigation-ui-ktx:2.7.7'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'

    implementation 'com.google.android.gms:play-services-maps:18.2.0'
    implementation 'com.google.android.gms:play-services-location:21.1.0'
    implementation 'com.google.android.gms:play-services-basement:18.3.0'
    implementation 'com.google.android.gms:play-services-wearable:18.1.0'
    implementation 'androidx.preference:preference-ktx:1.2.1'

    releaseImplementation 'com.google.firebase:firebase-analytics-ktx:21.5.1'
    releaseImplementation 'com.google.firebase:firebase-crashlytics-ktx:18.6.2'

    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'

    implementation 'androidx.fragment:fragment-ktx:1.6.2'

    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.7.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.7.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
    implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"

    implementation "com.google.dagger:hilt-android:$hilt_version"
    kapt "com.google.dagger:hilt-compiler:$hilt_version"

    implementation 'com.jjoe64:graphview:4.2.2'
    implementation 'com.github.AppIntro:AppIntro:6.1.0'
    implementation 'com.afollestad.material-dialogs:core:3.3.0'
    implementation 'io.github.ShawnLin013:number-picker:2.4.13'
    implementation 'com.jaredrummler:material-spinner:1.3.1'
    implementation 'io.github.medyo:android-about-page:2.0.0'
    implementation 'de.psdev.licensesdialog:licensesdialog:2.2.0'
    implementation 'com.github.GrenderG:Toasty:1.5.2'

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

    debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.12'

}

kapt {
    correctErrorTypes true
}
