apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'io.fabric'
apply plugin: 'com.google.android.gms.oss-licenses-plugin'

android {
    compileSdkVersion 29
    defaultConfig {
        applicationId "com.egorovandreyrm.pcapremote"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 1000000019
        versionName "1.0.0.19"

//        externalNativeBuild {
//            cmake {
//                cppFlags "-std=c++17 -fexceptions -frtti -Wall -Wextra -Wconversion -Wunreachable-code"
//                arguments "-DANDROID_STL=c++_shared", "-DANDROID_TOOLCHAIN=clang"
//            }
//        }

//        ndk {
//            abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64', 'x86'
//        }

        resConfigs "en"
    }

    android.compileOptions.sourceCompatibility 1.8
    android.compileOptions.targetCompatibility 1.8

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

    sourceSets {
//        main {
//            jniLibs.srcDirs = []
//            jni.srcDirs = []
//        }

        debug {
            return void
        }

        release {
            return void
        }
    }

//    externalNativeBuild {
//        cmake {
//            path file("src/main/jni/pcapremote/CMakeLists.txt")
//        }
//    }

    packagingOptions {
        exclude 'META-INF/atomicfu.kotlin_module'
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'androidx.preference:preference:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.jakewharton.timber:timber:4.7.1'
    implementation 'androidx.core:core-ktx:1.2.0'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "androidx.room:room-runtime:2.2.3"
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    implementation "androidx.cardview:cardview:1.0.0"
    implementation "com.google.dagger:dagger:2.24"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2'
    implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.2.0"
    implementation 'com.google.firebase:firebase-core:17.2.2'
    implementation 'com.google.firebase:firebase-analytics:17.2.2'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
    implementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'
    implementation "com.vorlonsoft:androidrate:1.2.1"
    implementation 'org.greenrobot:eventbus:3.1.1'


    kapt "com.google.dagger:dagger-compiler:2.24"
    kapt "androidx.room:room-compiler:2.2.3"
}

repositories {
    mavenCentral()
}

apply plugin: 'com.google.gms.google-services'
