plugins {
    id 'com.android.application'
    id 'kotlin-android'
    // id 'kotlin-android-extensions'
    id 'org.jetbrains.kotlin.kapt'
    id 'com.google.gms.google-services'
    id 'realm-android'
    id("kotlin-parcelize")
    //id 'dagger.hilt.android.plugin'
}

//apply plugin: "realm-android"

android {
    signingConfigs {
        release {
            storePassword 'seatel_Cambodia'
            keyPassword 'seatel_Cambodia'
            keyAlias 'seatel_cambodia'
            storeFile file('/Users/seatel/android_project/android-yes/seashop.jks')
        }
    }
    compileSdk 35
    namespace 'com.seatel.mobilehall'

    defaultConfig {
        applicationId "com.seatel.mobilehall"
        minSdk 23
        compileSdk 34
        versionCode 202720000
        versionName "2.3.20"
        multiDexEnabled true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        signingConfig signingConfigs.release
    }

    buildTypes {
        release {
            resValue "string", "app_name", "yes seatel"
            buildConfigField 'String', 'CLIENT_ID', '"eyJhbGciOiJIUzI1NiJ9.c2VhdGVsLWFwaS1kZXY.NsFhP0C7pqeONbcGAf42lQLLe6AIgy1QdOUOrg0uqcI"'
            buildConfigField 'String', 'BASE_URL', '"https://api.yes.com.kh/"'
            //production version
            buildConfigField 'String', 'CLIENT_SECRET', '"MjExNzM0NWNiNTA3NDZmNzg4NmE0NTNlYjYyMWNkODk="'
            minifyEnabled false
            shrinkResources false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
            proguardFile '/Users/ryan/Documents/Project/Seatel_android_project/sea-tel-android/app/proguard-rules.pro'
            ext.alwaysUpdateBuildId = false

        }
        debug {
            resValue "string", "app_name", "yes seatel dev"
            buildConfigField 'String', 'CLIENT_ID', '"eyJhbGciOiJIUzI1NiJ9.c2VhdGVsLWFwaS1kZXY.NsFhP0C7pqeONbcGAf42lQLLe6AIgy1QdOUOrg0uqcI"'
            //buildConfigField 'String', 'BASE_URL', '"http://api-dev.yes.com.kh/"'
            buildConfigField 'String', 'BASE_URL', '"https://api-dev.yes.com.kh/"'
            buildConfigField 'String', 'CLIENT_SECRET', '"MjExNzM0NWNiNTA3NDZmNzg4NmE0NTNlYjYyMWNkODk="'
            debuggable true
            buildConfigField 'Boolean', 'enableCrashlytics', 'false'
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            ext.alwaysUpdateBuildId = false
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    packagingOptions {
        resources {
            excludes += ['META-INF/DEPENDENCIES']
        }
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }

    viewBinding {
        enabled = true
    }

    /*realm {
        syncEnabled = true
    }*/
    sourceSets {
        main {
            assets {
                srcDirs 'src/main/assets'
            }
        }
    }

    lint {
        baseline = file("lint-baseline.xml")
    }
    lintOptions {
        abortOnError false
    }

        buildFeatures {
            buildConfig true
        }
    
}

configurations {
    customImplementation
}

dependencies {

    implementation fileTree(dir: 'libs', include: ['*.aar'])

    implementation 'androidx.core:core-ktx:1.8.0'
    implementation 'androidx.appcompat:appcompat:1.4.2'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.4.2'
    implementation 'androidx.navigation:navigation-ui-ktx:2.4.2'
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'

    implementation 'com.google.code.gson:gson:2.9.0'
    implementation 'com.github.bumptech.glide:glide:4.13.0'
    implementation 'com.google.firebase:firebase-messaging-ktx:23.1.2'
    implementation 'androidx.work:work-runtime-ktx:2.8.1'
    implementation 'com.google.android.gms:play-services-mlkit-barcode-scanning:18.3.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.13.0'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.github.bigstark:fresco-parallax-drawee-view:1.2.1'
    implementation 'com.facebook.android:facebook-android-sdk:4.42.0'
    implementation 'com.mcxiaoke.volley:library:1.0.19'
    implementation 'com.jaredrummler:android-device-names:1.1.7'

    implementation 'com.google.android.material:material:1.6.1'
    implementation 'com.google.maps.android:android-maps-utils:0.5'
    implementation 'com.google.android.gms:play-services-gcm:17.0.0'
    implementation 'com.google.android.gms:play-services-auth:17.0.0'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    implementation 'com.google.android.gms:play-services-location:17.0.0'
    implementation 'com.google.android.gms:play-services-analytics:17.0.0'
    implementation 'com.google.android.gms:play-services-measurement-api:21.1.0'
    implementation 'com.google.android.gms:play-services-vision:20.1.3'
    implementation("com.google.android.material:material:1.12.0")

    //firebase
    implementation platform('com.google.firebase:firebase-bom:31.2.3')
    implementation 'com.google.firebase:firebase-analytics-ktx'
    implementation 'com.google.firebase:firebase-ml-vision:24.0.3'
    implementation 'com.google.firebase:firebase-ml-vision-barcode-model:16.1.2'

    implementation 'com.github.markomilos:paginate:0.5.1'
    implementation 'com.github.markusressel:PageIndicatorView:v0.9.6'

    api 'io.anyline:anylinesdk:18.1@aar'
    customImplementation('io.anyline:anylinesdk:18.1@aar')
    api 'org.apache.httpcomponents:httpcore:4.4.6'
    api 'org.apache.httpcomponents:httpmime:4.3.6'
    implementation 'org.apache.httpcomponents:httpcore:4.4.10'
    implementation 'id.zelory:compressor:3.0.1'


    implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.23'

    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
    implementation 'de.hdodenhof:circleimageview:2.2.0'


    implementation("io.coil-kt:coil:2.2.2")
    implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'com.google.android.exoplayer:exoplayer:2.18.4'
    implementation "com.airbnb.android:lottie:6.0.0"


    // camera x
    def camerax_version = "1.0.2"
    implementation "androidx.camera:camera-core:${camerax_version}"
    implementation "androidx.camera:camera-lifecycle:${camerax_version}"
    implementation "androidx.camera:camera-camera2:${camerax_version}"
    implementation "androidx.camera:camera-view:1.0.0-alpha32"

    // mlkit face detection & gson
    implementation "com.google.mlkit:face-detection:16.1.5"
    implementation "com.google.code.gson:gson:2.8.6"

    // Use a stable version for TensorFlow Lite
    implementation("org.tensorflow:tensorflow-lite:2.4.0") {
        changing = true
    }
    // Use the latest nightly build or stable version for GPU delegate
    implementation("org.tensorflow:tensorflow-lite-gpu:2.4.0") {
        changing = true
    }
    // Use the latest nightly build or stable version for TensorFlow Lite Support Library
    implementation("org.tensorflow:tensorflow-lite-support:0.1.0") {
        changing = true
    }

    // implementation 'com.dinuscxj:circleprogressbar:1.3.6'
    //  implementation(name: 'circleprogressbar-debug', ext: 'aar')

    //implementation 'com.github.smarteist:autoimageslider:1.4.0'

    //api 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
    implementation("com.vanniktech:android-image-cropper:4.6.0")
    // implementation 'com.github.CanHub:Android-Image-Cropper:4.3.2'
    //   implementation 'io.realm:realm-gradle-plugin:10.11.1'

    // test
    testImplementation 'junit:junit'
    androidTestImplementation 'androidx.test.ext:junit:1.2.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'

}
