import java.text.SimpleDateFormat
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
signingConfigs {
release {
storeFile file('SafetyAuxiliary.jks')
storePassword '123456789'
keyAlias 'key0'
keyPassword '123456789'
}
}
compileSdkVersion 33
defaultConfig {
applicationId "com.casic.br.app"
minSdkVersion 24
targetSdkVersion 33
versionCode 1000
versionName "1.0.0.0"
ndkVersion "26.1.10909125"
ndk {
abiFilters "arm64-v8a", "armeabi-v7a", "x86_64", "x86"
}
}
buildTypes {
debug {
signingConfig signingConfigs.release
}
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
}
kotlinOptions {
jvmTarget = '1.8'
}
externalNativeBuild {
cmake {
path file('src/main/cpp/CMakeLists.txt')
version '3.22.1'
}
}
kotlin {
experimental {
coroutines 'enable'
}
}
buildFeatures {
viewBinding = true
}
applicationVariants.configureEach { variant ->
variant.outputs.configureEach {
outputFileName = "br_safety_auxiliary_" + getBuildDate() + "_" + defaultConfig.versionName + ".apk"
}
}
}
static def getBuildDate() {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd", Locale.CHINA)
return dateFormat.format(System.currentTimeMillis())
}
dependencies {
//基础依赖库
implementation 'com.github.AndroidCoderPeng:Kotlin-lite-lib:1.0.10'
implementation 'androidx.core:core-ktx:1.9.0'
def androidx_version = '1.6.1'
implementation "androidx.appcompat:appcompat:${androidx_version}"
implementation "com.google.android.material:material:${androidx_version}"
implementation 'androidx.cardview:cardview:1.0.0'
//Google官方授权框架
implementation 'pub.devrel:easypermissions:3.0.0'
//沉浸式状态栏。基础依赖包,必须要依赖
implementation 'com.gyf.immersionbar:immersionbar:3.0.0'
//fragment快速实现
implementation 'com.gyf.immersionbar:immersionbar-components:3.0.0'
//官方Json解析库
implementation 'com.google.code.gson:gson:2.10.1'
def vm_version = "2.5.1"
//Kotlin协程
implementation "androidx.lifecycle:lifecycle-runtime-ktx:${vm_version}"
//MVVM+LiveData
implementation "androidx.lifecycle:lifecycle-livedata-ktx:${vm_version}"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:${vm_version}"
implementation "androidx.lifecycle:lifecycle-extensions:2.2.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'
//上拉加载下拉刷新
implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0'
//视频播放器
implementation 'com.github.CarGuo.GSYVideoPlayer:GSYVideoPlayer:v8.4.0-release-jitpack'
//CameraX
def camerax_version = '1.2.3'
//CameraX Camera2 extensions
implementation "androidx.camera:camera-camera2:$camerax_version"
//CameraX Lifecycle library
implementation "androidx.camera:camera-lifecycle:$camerax_version"
//CameraX View class
implementation "androidx.camera:camera-view:$camerax_version"
//PDF预览
implementation 'com.github.barteksc:android-pdf-viewer:2.8.2'
//图片加载框架
implementation 'com.github.bumptech.glide:glide:4.9.0'
//图片选择框架
implementation 'io.github.lucksiege:pictureselector:v3.11.1'
//图片压缩
implementation 'top.zibin:Luban:1.1.8'
//高德导航、定位、地图三合一
implementation 'com.amap.api:navi-3dmap:latest.integration'
//生成二维码
implementation 'cn.bertsir.zbarLibary:zbarlibary:1.4.2'
//OpenCV
implementation project(':sdk')
}