plugins {
    id 'com.android.application'
    id 'kotlin-android'
}
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 33
//    buildToolsVersion "30.0.2"

    defaultConfig {
        applicationId "com.cr.cruav"
        minSdkVersion 23
        targetSdkVersion 33
        versionCode 1
        versionName "V1.0.0"
        multiDexEnabled true
        ndk {
            abiFilters 'arm64-v8a'
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        debug{
            debuggable true
        }
    }
    dexOptions {
        javaMaxHeapSize "4g"
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    packagingOptions {
        pickFirst 'lib/arm64-v8a/libc++_shared.so'
        pickFirst 'lib/armeabi-v7a/libc++_shared.so'
    }
    //关闭lint
    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }

    packagingOptions {
        doNotStrip "*/*/libconstants.so"
        doNotStrip "*/*/libdji_innertools.so"
        doNotStrip "*/*/libdjibase.so"
        doNotStrip "*/*/libDJICSDKCommon.so"
        doNotStrip "*/*/libDJIFlySafeCore-CSDK.so"
        doNotStrip "*/*/libdjifs_jni-CSDK.so"
        doNotStrip "*/*/libDJIRegister.so"
        doNotStrip "*/*/libdjisdk_jni.so"
        doNotStrip "*/*/libDJIUpgradeCore.so"
        doNotStrip "*/*/libDJIUpgradeJNI.so"
        doNotStrip "*/*/libDJIWaypointV2Core-CSDK.so"
        doNotStrip "*/*/libdjiwpv2-CSDK.so"
        doNotStrip "*/*/libffmpeg.so"
        doNotStrip "*/*/libFlightRecordEngine.so"
        doNotStrip "*/*/libvideo-framing.so"
        doNotStrip "*/*/libwaes.so"
        doNotStrip "*/*/libagora-rtsa-sdk.so"
        doNotStrip "*/*/libc++.so"
        doNotStrip "*/*/libc++_shared.so"
        doNotStrip "*/*/libmrtc_28181.so"
        doNotStrip "*/*/libmrtc_agora.so"
        doNotStrip "*/*/libmrtc_core.so"
        doNotStrip "*/*/libmrtc_core_jni.so"
        doNotStrip "*/*/libmrtc_data.so"
        doNotStrip "*/*/libmrtc_log.so"
        doNotStrip "*/*/libmrtc_onvif.so"
        doNotStrip "*/*/libmrtc_rtmp.so"
        doNotStrip "*/*/libmrtc_rtsp.so"
    }
}

dependencies {

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    implementation "com.dji:dji-sdk-v5-aircraft:$djisdk_version"
    implementation "com.dji:dji-sdk-v5-networkImp:$djisdk_version"
    compileOnly "com.dji:dji-sdk-v5-aircraft-provided:$djisdk_version"

    implementation 'com.squareup.okio:okio:1.17.2'
    implementation 'com.squareup.wire:wire-runtime:2.2.0'
    implementation 'com.airbnb.android:lottie:3.3.1'

    implementation "com.esri.arcgisruntime:arcgis-android:100.8.0"
    api 'com.contrarywind:Android-PickerView:4.1.9'

//    api 'androidx.activity:activity-ktx:1.2.0-alpha01'
    api 'androidx.fragment:fragment-ktx:1.2.0-alpha01'
    api 'com.squareup:otto:1.3.8'
    api 'com.squareup.okhttp3:okhttp:4.2.0'

    //TODO 引入屏幕适配框架
    implementation 'me.jessyan:autosize:1.2.1'

    //TODO 地理计算工具
    api 'org.locationtech.jts:jts-core:1.18.2'
    //api "org.geotools:gt-main:$geotools_version"
    //api "org.geotools:gt-epsg-hsql:$geotools_version"
    api 'cn.carbs.android:SegmentControlView:1.0.0'
}