133 lines
4.2 KiB
Groovy
133 lines
4.2 KiB
Groovy
plugins {
|
||
id 'com.android.application'
|
||
id 'kotlin-android'
|
||
}
|
||
|
||
def releaseTime() {
|
||
return new Date().format("yyyyMMddHHmmss")
|
||
}
|
||
|
||
android {
|
||
compileSdkVersion 33
|
||
defaultConfig {
|
||
applicationId "com.tairui.industrial_operation"
|
||
minSdkVersion 21
|
||
targetSdkVersion 33
|
||
versionCode 1
|
||
versionName "1.0"
|
||
multiDexEnabled true
|
||
javaCompileOptions {
|
||
annotationProcessorOptions {
|
||
arguments = [
|
||
//必须,告知RxHttp你依赖的okhttp版本,目前已适配 v3.12.0 - v4.8.1版本
|
||
rxhttp_okhttp : '4.8.1',
|
||
//使用asXxx方法时必须,告知RxHttp你依赖的rxjava版本,可传入rxjava2、rxjava3
|
||
rxhttp_rxjava : 'rxjava2',
|
||
rxhttp_package: 'rxhttp' //非必须,指定RxHttp相关类的生成路径,即包名
|
||
]
|
||
}
|
||
}
|
||
renderscriptTargetApi 21
|
||
renderscriptSupportModeEnabled true
|
||
}
|
||
|
||
buildFeatures {
|
||
viewBinding true
|
||
}
|
||
|
||
sourceSets {
|
||
main {
|
||
jniLibs.srcDir 'libs'
|
||
}
|
||
}
|
||
dexOptions {
|
||
javaMaxHeapSize "4g"
|
||
}
|
||
|
||
compileOptions {
|
||
sourceCompatibility JavaVersion.VERSION_1_8
|
||
targetCompatibility JavaVersion.VERSION_1_8
|
||
}
|
||
signingConfigs {
|
||
release {
|
||
storeFile file('../key/tairui.jks')
|
||
storePassword "tairui"
|
||
keyAlias "tairui"
|
||
keyPassword "tairui"
|
||
}
|
||
}
|
||
buildTypes {
|
||
debug {
|
||
signingConfig signingConfigs.release
|
||
jniDebuggable false
|
||
zipAlignEnabled false
|
||
}
|
||
release {
|
||
zipAlignEnabled true
|
||
signingConfig signingConfigs.release
|
||
minifyEnabled false
|
||
jniDebuggable false
|
||
|
||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||
}
|
||
|
||
}
|
||
|
||
lintOptions {
|
||
abortOnError false
|
||
}
|
||
|
||
android.applicationVariants.all { variant ->
|
||
variant.outputs.all {
|
||
outputFileName = "IndustrialOperation_app_v${variant.versionName}_${releaseTime()}.apk"
|
||
}
|
||
}
|
||
}
|
||
dependencies {
|
||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||
implementation 'com.google.android.material:material:1.5.0'
|
||
|
||
implementation 'com.google.code.gson:gson:2.8.7'
|
||
|
||
implementation 'com.scwang.smart:refresh-layout-kernel:2.0.1' //核心必须依赖
|
||
implementation 'com.scwang.smart:refresh-header-classics:2.0.1' //经典刷新头
|
||
implementation 'com.scwang.smart:refresh-header-material:2.0.1' //谷歌刷新头
|
||
implementation 'com.gyf.immersionbar:immersionbar:3.0.0'
|
||
|
||
// 事件总线
|
||
implementation 'org.greenrobot:eventbus:3.2.0'
|
||
//键值存储
|
||
implementation 'com.orhanobut:hawk:2.0.1'
|
||
|
||
// 底部导航库
|
||
implementation 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
|
||
|
||
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.50'
|
||
|
||
//rxhttp
|
||
implementation 'com.ljx.rxhttp:rxhttp:2.5.7'
|
||
implementation 'com.squareup.okhttp3:okhttp:4.8.1' //rxhttp v2.2.2版本起,需要手动依赖okhttp
|
||
annotationProcessor 'com.ljx.rxhttp:rxhttp-compiler:2.5.7' //生成RxHttp类,纯Java项目,请使用annotationProcessor代替kapt
|
||
//rxjava2 (RxJava2/Rxjava3二选一,使用asXxx方法时必须)
|
||
implementation 'io.reactivex.rxjava2:rxjava:2.2.8'
|
||
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
||
implementation 'com.rxjava.rxlife:rxlife:2.0.0'
|
||
// glide加载图片
|
||
implementation 'com.github.bumptech.glide:glide:4.12.0'
|
||
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
|
||
|
||
implementation project(path: ':DialogX')
|
||
implementation project(path: ':DialogXMaterialYou')
|
||
|
||
implementation 'com.github.zhpanvip:bannerviewpager:3.5.12'
|
||
|
||
implementation 'com.github.AAChartModel:AAChartCore:-SNAPSHOT'
|
||
|
||
implementation 'com.github.li-xiaojun:XPopup:v2.2.23'
|
||
|
||
}
|