ext {
    time = ""
    kotlin_version = "1.4.31"
    android = [

            compileSdkVersion: 29,
            buildToolsVersion: "29.0.2",
            minSdkVersion    : 19,
            targetSdkVersion : 28,
    ]
    dependencies = [
            kotlinstdlibjdk7         : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}",

            // android
            androidxappcompat        : "androidx.appcompat:appcompat:1.3.1",
            androidxconstraintlayout : "androidx.constraintlayout:constraintlayout:2.1.0",
            boostmultidex            : "com.bytedance.boost_multidex:boost_multidex:1.0.1",
            // logger
            logger                   : "com.elegant.logger:logger:1.0.5",
            // flexbox
            flexbox                  : 'com.google.android:flexbox:2.0.1',
            // 测试
            junit                    : "junit:junit:4.12",
            // json 转换
            gson                     : "com.google.code.gson:gson:2.8.4",
            // 内存泄漏检测
            debugleakcanary          : "com.squareup.leakcanary:leakcanary-android:1.6.1",
            releaseleakcanary        : "com.squareup.leakcanary:leakcanary-android-no-op:1.6.1",
            testleakcanary           : "com.squareup.leakcanary:leakcanary-android-no-op:1.6.1",
            //rxJava
            rxjava                   : "io.reactivex.rxjava2:rxjava:2.2.2",
            rxandroid                : "io.reactivex.rxjava2:rxandroid:2.1.0",
            // glide
            glide                    : 'com.github.bumptech.glide:glide:4.8.0',
            fresco                   : 'com.facebook.fresco:fresco:1.9.0',

            retrofit                 : "com.squareup.retrofit2:retrofit:2.6.4",
            retrofitadapter          : "com.squareup.retrofit2:adapter-rxjava2:2.6.4",
            retrofitconvertergson    : "com.squareup.retrofit2:converter-gson:2.6.4",
            retrofitconverterscalars : "com.squareup.retrofit2:converter-scalars:2.6.4",

            // leakcanary
            leakcanary               : 'com.squareup.leakcanary:leakcanary-android:1.5.4',
            leakcanarynoop           : 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4',

            // add for room
            room                     : "android.arch.persistence.room:runtime:1.1.1",
            roomAnnotationProcessor  : 'android.arch.persistence.room:compiler:1.1.1',

            // rxjava2 with room
            roomRxjava               : "android.arch.persistence.room:rxjava2:1.1.1",

            //
            jetbrainsannotationsjava5: "org.jetbrains:annotations-java5:15.0",

            // crash
            crashSdk                 : "com.zhidaoauto.crash.log:library:1.0.5",

            videoprocessor           : "com.zhidao.video:video-processor:1.0.2.1",

            // 直播SDK
            live_sdk_zego            : "im.zego:express-video:2.19.0",

            adasapi                  : "com.zhidao.autopilot.support:adas:1.0.6.6",
            adasconfigapi            : "com.zhidao.adasconfig:adasconfig:1.1.5.2",

            // obu sdk
            obusdk                   : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3",

            // google
            googlezxing              : "com.google.zxing:core:3.3.3",
            litezxing                : "com.google.zxing:litezxing:1.0.29.8",
            cossdk                   : "com.zhidao.cosupload:cosuploadsdk:1.1.6",
            spi                      : 'com.elegant.spi:api:1.0.9.1' ,//运行时spi库

            //========================== ProtoBuf =======================
            protoc                       : !isM1Chip() ? "com.google.protobuf:protoc:3.12.4" : "com.google.protobuf:protoc:3.12.4:osx-x86_64",
            protobuf_java                : "com.google.protobuf:protobuf-java:3.12.4",
            protobuf_java_util           : "com.google.protobuf:protobuf-java-util:3.12.4",

    ]

}

boolean isM1Chip() {
    return System.getProperty("os.name").contains("Mac") && System.getProperty("os.arch") == "aarch64"
}