189 lines
6.6 KiB
Groovy
189 lines
6.6 KiB
Groovy
plugins {
|
||
id 'com.android.application'
|
||
id 'kotlin-android'
|
||
id 'kotlin-android-extensions'
|
||
id("kotlin-kapt") // Only for Kotlin projects.
|
||
id("io.objectbox") // Add after other plugins.
|
||
}
|
||
|
||
android {
|
||
compileSdkVersion 31
|
||
buildToolsVersion "30.0.3"
|
||
|
||
defaultConfig {
|
||
applicationId "com.qidian.zhongkesmart"
|
||
minSdkVersion 24
|
||
// minSdkVersion 21
|
||
targetSdkVersion 29
|
||
// targetSdkVersion 31
|
||
versionCode 1
|
||
versionName "1.0.1"
|
||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||
|
||
// ndk {
|
||
// //选择要添加的对应 cpu 类型的 .so 库。
|
||
// abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86'
|
||
// // 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
|
||
// }
|
||
ndk {
|
||
rootProject.ext.ndkAbis.each { abi ->
|
||
abiFilter(abi)
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
|
||
sourceSets {
|
||
main {
|
||
jniLibs.srcDir 'libs'
|
||
}
|
||
}
|
||
repositories {
|
||
flatDir { dirs 'libs' }
|
||
mavenCentral()
|
||
}
|
||
signingConfigs {
|
||
release {
|
||
keyAlias 'key0'
|
||
keyPassword '123456'
|
||
storeFile file('../zksmart.jks')
|
||
storePassword '123456'
|
||
}
|
||
}
|
||
buildTypes {
|
||
release {
|
||
minifyEnabled false
|
||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||
signingConfig signingConfigs.release
|
||
}
|
||
debug {
|
||
signingConfig signingConfigs.release
|
||
}
|
||
}
|
||
applicationVariants.all { variant ->
|
||
variant.outputs.all {
|
||
def createTime = new Date().format("MMddHHmm", TimeZone.getTimeZone("GMT+08:00"))
|
||
//只处理生产版本
|
||
if (buildType.name == 'release') {
|
||
// app包名称
|
||
outputFileName = "app_zksmart_release" + defaultConfig.versionName + "_" + defaultConfig.versionCode + "_" + createTime + ".apk"
|
||
} else {
|
||
outputFileName = "app_zksmart_test" + defaultConfig.versionName + "_" + defaultConfig.versionCode + "_" + createTime + ".apk"
|
||
}
|
||
}
|
||
}
|
||
/* 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'
|
||
}
|
||
|
||
|
||
packagingOptions {
|
||
pickFirst 'lib/arm64-v8a/libc++_shared.so'
|
||
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
|
||
}
|
||
|
||
def appKey = "72eed074506376b102a91e6a80ef9a71"
|
||
|
||
// app key for code
|
||
defaultConfig {
|
||
buildConfigField "String", "APP_KEY", "\"${appKey}\""
|
||
}
|
||
// base server url
|
||
defaultConfig {
|
||
buildConfigField "String", "BASE_URL", "\"https://yiyong.netease.im/\""
|
||
}
|
||
|
||
configurations.all {
|
||
// check for updates every build
|
||
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
|
||
}
|
||
}
|
||
|
||
dependencies {
|
||
|
||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||
implementation 'androidx.core:core-ktx:1.3.1'
|
||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||
implementation 'com.google.android.material:material:1.2.1'
|
||
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
|
||
implementation files('libs\\core_3.0.1.jar')
|
||
implementation files('libs\\QWeather_Public_Android_V4.10.jar')
|
||
|
||
testImplementation 'junit:junit:4.+'
|
||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
||
implementation 'com.android.support:support-v4:28.0.0'
|
||
implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-26'
|
||
//状态栏
|
||
implementation 'com.gyf.immersionbar:immersionbar:3.0.0'
|
||
implementation 'net.idik:slimadapter:2.1.2'
|
||
|
||
def aar = ['FlycoDialog-1.3.2']
|
||
aar.each { implementation(name: it, ext: 'aar') }
|
||
|
||
// implementation 'cn.yipianfengye.android:zxing-library:2.2'
|
||
implementation 'pub.devrel:easypermissions:3.0.0'
|
||
//chart
|
||
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
|
||
//验证码样式
|
||
implementation 'com.jacktuotuo.customview:verificationcodeview:1.0.5'
|
||
//eventbus 事件分发
|
||
implementation 'org.greenrobot:eventbus:3.1.1'
|
||
// implementation 'com.squareup.okhttp3:okhttp:3.10.0'
|
||
//网络okgo
|
||
implementation 'com.lzy.net:okgo:3.0.4'
|
||
//json
|
||
implementation 'com.alibaba:fastjson:1.2.76'
|
||
// implementation 'com.google.code.gson:gson:2.8.8'
|
||
api 'io.reactivex.rxjava2:rxjava:2.2.9'
|
||
api 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
||
//蓝牙连接
|
||
// implementation 'com.inuker.bluetooth:library:1.4.0'
|
||
// api project(":lib-zxing")
|
||
// implementation project(path: ':FlycoDialog_Lib')
|
||
implementation 'com.vise.xiaoyaoyou:viselog:1.1.2'
|
||
/*蓝牙BLE*/
|
||
implementation 'com.vise.xiaoyaoyou:xsnow:2.1.3'
|
||
//eventbus 事件分发
|
||
implementation 'org.greenrobot:eventbus:3.1.1'
|
||
implementation 'com.makeramen:roundedimageview:2.3.0'
|
||
|
||
implementation 'com.hyman:flowlayout-lib:1.1.2'
|
||
implementation 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
|
||
|
||
//高德地图-天气预报需要
|
||
implementation files('libs\\AMap2DMap_6.0.0_AMapSearch_9.2.0_AMapLocation_6.1.0_20220414.jar')
|
||
compile 'com.squareup.okhttp3:okhttp:3.12.12'
|
||
compile 'com.google.code.gson:gson:2.6.2'
|
||
|
||
implementation 'com.tencent.bugly:crashreport:latest.release' //其中latest.release指代最新Bugly SDK版本号,也可以指定明确的版本号,例如2.1.9
|
||
implementation 'com.tencent.bugly:nativecrashreport:latest.release' //其中latest.release指代最新Bugly NDK版本号,也可以指定明确的版本号,例如3.0
|
||
|
||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||
|
||
api 'com.squareup.okhttp3:logging-interceptor:3.12.12'
|
||
implementation 'com.blankj:utilcodex:1.30.5'
|
||
api 'com.netease.yunxin.kit:call-ui:1.6.1'
|
||
implementation 'com.jakewharton:butterknife:10.1.0'
|
||
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
|
||
|
||
implementation 'no.nordicsemi.android:dfu:1.11.1'
|
||
// Manually add objectbox-android-objectbrowser only for debug builds,
|
||
// and objectbox-android for release builds.
|
||
// debugImplementation("io.objectbox:objectbox-android-objectbrowser:$objectboxVersion")
|
||
}
|
||
// Apply the plugin after the dependencies block so it picks up
|
||
// and does not add objectbox-android.
|
||
apply plugin: 'io.objectbox' |