apply plugin: 'com.android.application'

android {
    if (project.android.hasProperty("namespace")) {
        namespace("com.dx.anonymousmessenger")
    }
    buildFeatures {
        buildConfig = true
    }
    compileSdkVersion 34
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    defaultConfig {
        applicationId "com.dx.anonymousmessenger"
        minSdkVersion 21
        targetSdkVersion 34
        versionCode 57
        versionName "0.9.5"
        setProperty("archivesBaseName", applicationId + "-v" + versionCode + "(" + versionName + ")")
        ndk{
            abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
        }
        resValue "string", "file_provider", applicationId+".fileprovider"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        signingConfig signingConfigs.debug
    }

    buildTypes {
        release {
            minifyEnabled false
            debuggable false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        debug {
            minifyEnabled false
            debuggable false
        }
    }
    packagingOptions {
        resources {
            excludes += ['META-INF/DEPENDENCIES', 'META-INF/LICENSE', 'META-INF/LICENSE.txt', 'META-INF/license.txt', 'META-INF/NOTICE', 'META-INF/NOTICE.txt', 'META-INF/notice.txt', 'META-INF/ASL2.0', 'org/eclipse/jetty/http/encoding.properties']
        }
    }

}

repositories {
//    maven { url "https://raw.githubusercontent.com/guardianproject/gpmaven/master" }
    google()
    jcenter()
}

dependencies {
    api fileTree(dir: 'libs', include: ['*.jar','*.so'])
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.3.2'
//    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'

    implementation 'com.google.android.material:material:1.10.0'
    implementation 'com.google.zxing:core:3.5.2'
    implementation 'me.dm7.barcodescanner:zxing:1.9.13'
    implementation 'com.google.protobuf:protobuf-java:3.9.2' //later versions min api 26+

    implementation 'net.zetetic:android-database-sqlcipher:4.4.3@aar'
    implementation "androidx.sqlite:sqlite:2.4.0"

    implementation 'com.alexvasilkov:gesture-views:2.8.3'
    implementation 'com.github.omadahealth:swipy:1.2.3@aar'
    implementation 'androidx.exifinterface:exifinterface:1.3.6'
//    implementation 'com.netcompss:ffmpeg4android_lib:41.09'

//    debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.4'

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