Files
UIUIPadAppstore/app/build.gradle
fanhuitong 4456949a00 update:1.7.4
date:2021-10-11 18:29:55
fix:
add:沉浸状态栏
2021-10-11 18:30:11 +08:00

177 lines
6.5 KiB
Groovy
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
def appName() {
return "UIUIAPPStore"
}
def releaseTime() {
return new Date().format("yyyyMMdd", TimeZone.getDefault())
}
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.appstore.uiui"
minSdkVersion 26
targetSdkVersion 29
versionCode 74
versionName "1.7.4"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
//极光
ndk {
//选择要添加的对应 cpu 类型的 .so 库。
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a'
// 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
}
manifestPlaceholders = [
JPUSH_PKGNAME: applicationId,
JPUSH_APPKEY : "d7ad4da7d65687b32cacbdb1", //JPush 上注册的包名对应的 Appkey.
JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
]
}
compileOptions{
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
checkReleaseBuilds false
}
//签名
signingConfigs {
zhanRui {
storeFile file("src/keys/zhanxun.keystore")
storePassword "123456"
keyAlias "zhanxun"
keyPassword "123456"
v1SigningEnabled true
v2SigningEnabled true
}
debug {
storeFile file("src/keys/xueshibaoos.jks")
storePassword "123456"
keyAlias "xueshibaoos"
keyPassword "123456"
v1SigningEnabled true
v2SigningEnabled true
}
release {// 签名文件
storeFile file("src/keys/xueshibaoos.jks")
storePassword "123456"
keyAlias "xueshibaoos"
keyPassword "123456"
v1SigningEnabled true
v2SigningEnabled true
}
}
buildTypes {
zhanRuiRelease.initWith(release)
zhanRuiRelease {
buildConfigField "String", "platform", '"ZhanRui"'
signingConfig signingConfigs.zhanRui
}
zhanRuiDebug.initWith(debug)
zhanRuiDebug {
versionNameSuffix "-debug"
buildConfigField "String", "platform", '"ZhanRui"'
debuggable true
signingConfig signingConfigs.zhanRui
}
debug {
buildConfigField "String", "platform", '"MTK"'
versionNameSuffix "-debug"
minifyEnabled false
//Zipalign优化
zipAlignEnabled true
signingConfig signingConfigs.debug
applicationVariants.all { variant ->
variant.outputs.each { output ->
if (outputFile != null) {
def fileName = "${appName()}-${variant.versionCode}-V${variant.versionName}-${releaseTime()}-${buildType.name}.apk"
output.outputFileName = fileName
}
}
}
}
release {
buildConfigField "String", "platform", '"MTK"'
//混淆
minifyEnabled false
//Zipalign优化
zipAlignEnabled true
//前一部分代表系统默认的android程序的混淆文件该文件已经包含了基本的混淆声明后一个文件是自己的定义混淆文件
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
//签名
signingConfig signingConfigs.release
// 将release版本的包名重命名加上版本及日期
applicationVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = ""
if (outputFile != null) {
def fileName = "${appName()}-${variant.versionCode}-V${variant.versionName}-${releaseTime()}-${buildType.name}.apk"
output.outputFileName = new File(outputFile, fileName)
}
}
}
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.cardview:cardview:1.0.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation "androidx.core:core-ktx:1.6.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
//github第三方控件
implementation 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
//下拉刷新控件
implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0' //1.0.5及以前版本的老用户升级需谨慎API改动过大
implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.0' //没有使用特殊Header可以不加这行
//glide
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
//aria
implementation 'com.arialyy.aria:core:3.8.15'
annotationProcessor 'com.arialyy.aria:compiler:3.8.15'
//动态权限框架
implementation 'com.hjq:xxpermissions:6.0'
//okhttp
implementation 'com.squareup.okhttp3:okhttp:4.6.0'
//RxJava和Retrofit
implementation 'io.reactivex.rxjava2:rxjava:2.2.5'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
//google
implementation 'com.google.code.gson:gson:2.8.7'
implementation 'com.google.zxing:core:3.3.0'
//fastjson
implementation 'com.alibaba:fastjson:1.2.76'
//极光推送
implementation 'cn.jiguang.sdk:jpush:3.8.6' // 此处以JPush 3.4.1 版本为例。
implementation 'cn.jiguang.sdk:jcore:2.6.0' // 此处以JCore 2.2.4 版本为例。
//banner图
implementation 'com.zhpan.library:bannerview:2.6.4'
//更换字体框架
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
//工具类
implementation 'com.blankj:utilcodex:1.30.6'
//沉浸状态栏
implementation 'com.gitee.zackratos:UltimateBarX:0.7.1'
}