apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
signingConfigs {
release {
storeFile file('/Users/a203/Desktop/AndroidProjects/SanxiTownSmartWell/app/SmartWell.jks')
storePassword '123456789'
keyAlias 'key0'
keyPassword '123456789'
}
}
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.casic.app.smartwell.sanxi"
minSdkVersion 23
targetSdkVersion 31
versionCode 1
versionName "1.0.0"
// 添加手机架构过滤,去掉老旧手机兼容
/**
* 只适配armeabi:
* 优点:基本可以适配所有手机机型,除了淘汰的mips和mips_64
* 缺点:在大多数手机上都需要利用辅助ABI或者动态转码来兼容,性能较差
* 只适配 armeabi-v7a
* 筛掉了一部分老旧设备,在性能和兼容二者中比较平衡
* 只适配 arm64-v8
* 优点:性能最佳(微信大哥采用的)
* 缺点:只能运行在arm64-v8上,要放弃部分老旧设备用户
* */
ndk { abiFilters "armeabi", "armeabi-v7a", "arm64-v8" }
}
buildTypes {
release {
minifyEnabled false
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlin {
experimental {
coroutines 'enable'
}
}
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = defaultConfig.versionName + ".apk"
}
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
//基础依赖库
implementation 'com.github.AndroidCoderPeng:Android-library:1.6.0'
//Google官方授权框架
implementation 'pub.devrel:easypermissions:3.0.0'
//腾讯Android UI框架
implementation 'com.qmuiteam:qmui:2.0.0-alpha10'
implementation 'com.qmuiteam:arch:0.3.1'
//沉浸式状态栏。基础依赖包,必须要依赖
implementation 'com.gyf.immersionbar:immersionbar:3.0.0'
//fragment快速实现
implementation 'com.gyf.immersionbar:immersionbar-components:3.0.0'
//MVVM+LiveData
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.3.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
//Kotlin协程
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.1'
//图片加载框架
implementation 'com.github.bumptech.glide:glide:4.9.0'
//图片选择框架
implementation 'com.github.LuckSiege.PictureSelector:picture_library:v2.6.0'
//返回值转换器
implementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.8.1'
//okhttp3日志拦截器
implementation 'com.squareup.okhttp3:logging-interceptor:4.6.0'
//网络请求和接口封装
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
//官方Json解析库
implementation 'com.google.code.gson:gson:2.8.6'
//上拉加载下拉刷新
implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0'
//高德地图搜索
implementation 'com.amap.api:search:8.1.0'
//高德导航
implementation 'com.amap.api:navi-3dmap:8.1.0_3dmap8.1.0'
//日期选择器
implementation 'com.jzxiang.pickerview:TimePickerDialog:1.0.1'
//标签流式布局
implementation group: 'com.hyman', name: 'flowlayout-lib', version: '1.1.2'
//图表
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
}