apply plugin: 'com.android.application'

android {
    namespace 'mobi.maptrek'

    ndkVersion '26.1.10909125'

    defaultConfig {
        applicationId "mobi.maptrek"
        minSdkVersion 23
        targetSdkVersion 34
        compileSdk 34
        versionCode 107
        versionName "2024.03.22"
        testInstrumentationRunner = 'androidx.test.runner.AndroidJUnitRunner'
        buildConfigField "java.util.concurrent.atomic.AtomicBoolean", "IS_TESTING", "new java.util.concurrent.atomic.AtomicBoolean(false)"
    }

    testOptions {
        animationsDisabled = true
    }

    viewBinding {
        enabled = true
    }

    androidResources {
        additionalParameters = ["--keep-raw-values"]
    }

    signingConfigs {
        debug {
            storeFile file("debug.keystore")
            storePassword "android"
            keyAlias "AndroidDebugKey"
            keyPassword "android"
        }
        release {
            storeFile file(project.hasProperty('RELEASE_STORE_FILE') ? RELEASE_STORE_FILE : "debug.keystore")
            storePassword project.hasProperty('RELEASE_STORE_PASSWORD') ? RELEASE_STORE_PASSWORD : "android"
            keyAlias project.hasProperty('RELEASE_KEY_ALIAS') ? RELEASE_KEY_ALIAS : "AndroidDebugKey"
            keyPassword project.hasProperty('RELEASE_KEY_PASSWORD') ? RELEASE_KEY_PASSWORD : "android"
        }
    }

    buildTypes {
        release {
            signingConfig signingConfigs.release
            minifyEnabled false
            //shrinkResources true
        }
    }

    externalNativeBuild {
        ndkBuild {
            path 'Android.mk'
        }
    }
    packagingOptions {
        resources {
            excludes += ['**/publicsuffixes.gz', '**/NOTICE']
        }
    }

    lint {
        abortOnError false
        checkReleaseBuilds true
    }
    buildFeatures {
        aidl true
        buildConfig true
    }
}

repositories {
    mavenLocal()
    maven { url "https://jitpack.io" }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    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.test.espresso:espresso-contrib:3.5.1'
    androidTestImplementation 'androidx.test:rules:1.5.0'
    implementation "androidx.tracing:tracing:1.2.0"
    implementation "androidx.lifecycle:lifecycle-viewmodel:2.7.0"
    implementation "androidx.lifecycle:lifecycle-livedata:2.7.0"
    implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.7.0"
    implementation "androidx.lifecycle:lifecycle-common-java8:2.7.0"
    implementation "androidx.fragment:fragment:1.6.2"
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.recyclerview:recyclerview:1.3.2'
    implementation 'androidx.recyclerview:recyclerview-selection:1.1.0'
    implementation "androidx.preference:preference:1.2.1"
    implementation "androidx.work:work-runtime:2.9.0"
    implementation 'androidx.core:core-splashscreen:1.0.1'
    implementation 'com.google.code.findbugs:jsr305:3.0.2'
    implementation 'androidx.annotation:annotation:1.7.1'
    implementation 'com.google.android.material:material:1.11.0'
    implementation 'com.github.andreynovikov:androidcolorpicker:0.0.6'
    implementation 'com.github.andreynovikov:Geo-Coordinate-Conversion-Java:v1.0.0'
    implementation 'com.caverock:androidsvg:1.4'
    implementation 'org.slf4j:slf4j-api:2.0.9'
    implementation 'com.github.tony19:logback-android:3.0.0'
    implementation 'org.greenrobot:eventbus:3.0.0'
    implementation 'com.squareup.okhttp3:okhttp:4.8.1'
    implementation 'org.openstreetmap.osmosis:osmosis-osm-binary:0.48.3'
    implementation 'com.fasterxml.jackson.core:jackson-core:2.11.2'
    implementation 'com.github.PhilJay:MPAndroidChart:v2.2.5'
    implementation 'com.github.jakob-grabner:Circle-Progress-View:v1.2.9'
    implementation 'com.getkeepsafe.taptargetview:taptargetview:1.13.3'
    implementation 'com.github.AppIntro:AppIntro:6.1.0'
    implementation 'de.hdodenhof:circleimageview:3.1.0'
    implementation 'com.github.robinst:autolink-java:autolink-0.10.1'
}
