plugins { id 'com.android.library' id 'org.jetbrains.kotlin.android' id 'kotlin-kapt' id 'kotlin-parcelize' } android { namespace 'com.zhyc.lib_base' compileSdk rootProject.ext.android.compileSdk defaultConfig { minSdk rootProject.ext.android.minSdk targetSdk rootProject.ext.android.targetSdk testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" ndk { //选择要添加的对应 cpu 类型的 .so 库 abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86_64' // 还可以添加 'x86', , 'mips', 'mips64' } manifestPlaceholders = [ JPUSH_PKGNAME : "com.zhyc.xapp", JPUSH_APPKEY : "c5572e5a4e9b3da2ac4332ee", //JPush 上注册的包名对应的 AppKey. JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可. MEIZU_APPKEY : "MZ-魅族的APPKEY", MEIZU_APPID : "MZ-魅族的APPID", XIAOMI_APPID : "MI-小米的APPID", XIAOMI_APPKEY : "MI-小米的APPKEY", OPPO_APPKEY : "OP-oppo的APPKEY", OPPO_APPID : "OP-oppo的APPID", OPPO_APPSECRET : "OP-oppo的APPSECRET", VIVO_APPID : "105618902", VIVO_APPKEY : "58b5042a8960c6302c217534496c5d03", HONOR_APPID : "honorAppid" ] // ARouter配置 kapt { arguments { arg("AROUTER_MODULE_NAME", project.getName()) } } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } buildFeatures { dataBinding true viewBinding true } } dependencies { implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs') api rootProject.ext.dependencies.coreKtx api rootProject.ext.dependencies.appcompat api rootProject.ext.dependencies.material api rootProject.ext.dependencies.constraintlayout api rootProject.ext.dependencies.junit api rootProject.ext.dependencies.junitExt api rootProject.ext.dependencies.espresso // jetpack api rootProject.ext.dependencies.viewModelKtx api rootProject.ext.dependencies.liveDataKtx // UI相关 api rootProject.ext.dependencies.smartRefreshCore api rootProject.ext.dependencies.smartRefreshHeader api rootProject.ext.dependencies.smartRefreshFooter api rootProject.ext.dependencies.recyclerview api rootProject.ext.dependencies.BaseRecyclerViewAdapterHelper api rootProject.ext.dependencies.materialDialogsCore api rootProject.ext.dependencies.materialDialogsLifecycle api rootProject.ext.dependencies.materialDialogsbottomsheets // immersionbar api rootProject.ext.dependencies.immersionbar api rootProject.ext.dependencies.immersionbar_ktx // web api rootProject.ext.dependencies.agentWeb api rootProject.ext.dependencies.agentWeb_filechooser api rootProject.ext.dependencies.agentWeb_downloader // 轮播图 https://github.com/youth5201314/banner api rootProject.ext.dependencies.banner api rootProject.ext.dependencies.flexbox // 存储相关 api rootProject.ext.dependencies.mmkv // 图片 api rootProject.ext.dependencies.glide api rootProject.ext.dependencies.picture_selector api rootProject.ext.dependencies.picture_compress api rootProject.ext.dependencies.picture_ucrop api rootProject.ext.dependencies.picture_camerax // 网络相关 api rootProject.ext.dependencies.retrofit api rootProject.ext.dependencies.converterGson api rootProject.ext.dependencies.loggingInterceptor api rootProject.ext.dependencies.PersistentCookieJar // Camerax x api rootProject.ext.dependencies.mnmlKitScaner api rootProject.ext.dependencies.camerax api rootProject.ext.dependencies.camerax_lifecycle api rootProject.ext.dependencies.camerax_view api rootProject.ext.dependencies.barcode_scanning // ARouter路由 api rootProject.ext.dependencies.arouter_api // Permission-X api rootProject.ext.dependencies.permissionx // bugly api rootProject.ext.dependencies.bugly_update api rootProject.ext.dependencies.bugly_nativecrashreport // multidex api rootProject.ext.dependencies.multidex // 使用debugApi只在调试时引入 debugApi rootProject.ext.dependencies.leakcanary // 此处以JCore 4.0.0 版本为例 implementation 'cn.jiguang.sdk:jcore:4.0.0' // 此处以JPush 4.8.5 版本为例 implementation 'cn.jiguang.sdk:jpush:4.8.5' //若不集成厂商通道,可直接跳过以下依赖 // 极光厂商插件版本与接入 JPush 版本保持一致,下同 // 接入华为厂商 implementation 'com.huawei.hms:push:6.5.0.300' implementation 'cn.jiguang.sdk.plugin:huawei:4.8.5' // 接入 FCM 厂商 implementation 'com.google.firebase:firebase-messaging:23.0.5' implementation 'cn.jiguang.sdk.plugin:fcm:4.8.5' // 接入魅族厂商 implementation 'cn.jiguang.sdk.plugin:meizu:4.8.5' // 接入 VIVO 厂商 implementation 'cn.jiguang.sdk.plugin:vivo:4.8.5' // 接入小米厂商 implementation 'cn.jiguang.sdk.plugin:xiaomi:4.8.5' // 接入 OPPO 厂商 implementation 'cn.jiguang.sdk.plugin:oppo:4.8.5' } apply plugin: 'com.google.gms.google-services' apply plugin: 'com.huawei.agconnect'