159 lines
5.6 KiB
Groovy
159 lines
5.6 KiB
Groovy
apply plugin: 'com.android.application'
|
||
apply plugin: 'kotlin-android-extensions'
|
||
apply plugin: 'kotlin-android'
|
||
|
||
def appName() {
|
||
return "UIUIAPPStore"
|
||
}
|
||
|
||
def releaseTime() {
|
||
return new Date().format("yyyyMMddHHmmss", TimeZone.getDefault())
|
||
}
|
||
|
||
android {
|
||
compileSdkVersion 29
|
||
buildToolsVersion "29.0.2"
|
||
defaultConfig {
|
||
applicationId "com.appstore.uiui"
|
||
minSdkVersion 23
|
||
targetSdkVersion 29
|
||
versionCode 15
|
||
versionName "1.1.5"
|
||
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", //暂时填写默认值即可.
|
||
]
|
||
}
|
||
lintOptions {
|
||
checkReleaseBuilds false
|
||
}
|
||
//签名
|
||
signingConfigs {
|
||
debug {
|
||
storeFile file("src/keys/xueshibaoos.jks")
|
||
storePassword "123456"
|
||
keyAlias "xueshibaoos"
|
||
keyPassword "123456"
|
||
v2SigningEnabled false
|
||
}
|
||
release {// 签名文件
|
||
storeFile file("src/keys/xueshibaoos.jks")
|
||
storePassword "123456"
|
||
keyAlias "xueshibaoos"
|
||
keyPassword "123456"
|
||
v2SigningEnabled false
|
||
}
|
||
}
|
||
|
||
buildTypes {
|
||
debug {
|
||
// 显示Log
|
||
buildConfigField "boolean", "LOG_DEBUG", "true"
|
||
versionNameSuffix "-debug"
|
||
minifyEnabled false
|
||
//Zipalign优化
|
||
zipAlignEnabled true
|
||
signingConfig signingConfigs.debug
|
||
applicationVariants.all { variant ->
|
||
variant.outputs.each { output ->
|
||
if (outputFile != null) {
|
||
def fileName = "${appName()}-V${defaultConfig.versionName}-${releaseTime()}.apk"
|
||
output.outputFileName = fileName
|
||
}
|
||
}
|
||
}
|
||
}
|
||
release {
|
||
// 不显示Log
|
||
buildConfigField "boolean", "LOG_DEBUG", "false"
|
||
//混淆
|
||
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()}-${defaultConfig.versionCode}-V${defaultConfig.versionName}-${releaseTime()}.apk"
|
||
output.outputFileName = new File(outputFile, fileName)
|
||
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
dependencies {
|
||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||
implementation 'androidx.appcompat:appcompat:1.0.2'
|
||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||
implementation 'androidx.recyclerview:recyclerview:1.0.0'
|
||
implementation 'androidx.cardview:cardview:1.0.0'
|
||
|
||
testImplementation 'junit:junit:4.12'
|
||
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
|
||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||
|
||
//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,可以不加这行
|
||
|
||
implementation 'com.github.bumptech.glide:glide:4.10.0'
|
||
annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0'
|
||
//aria
|
||
implementation 'com.arialyy.aria:core:3.7.7'
|
||
annotationProcessor 'com.arialyy.aria:compiler:3.7.7'
|
||
//OKGO
|
||
//必须使用
|
||
implementation 'com.lzy.net:okgo:3.0.4'
|
||
//以下三个选择添加,okrx和okrx2不能同时使用
|
||
implementation 'com.lzy.net:okrx:1.0.2'
|
||
// compile 'com.lzy.net:okrx2:2.0.2'
|
||
implementation 'com.lzy.net:okserver:2.0.5'
|
||
|
||
implementation 'com.alibaba:fastjson:1.2.21'
|
||
|
||
implementation 'com.blankj:utilcode:1.23.7'
|
||
//动态权限框架
|
||
implementation 'com.hjq:xxpermissions:6.0'
|
||
|
||
implementation 'com.squareup.retrofit2:converter-scalars:2.1.0'
|
||
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
|
||
implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
|
||
implementation 'io.reactivex:rxjava:1.2.2'
|
||
implementation 'io.reactivex:rxandroid:1.2.1'
|
||
|
||
|
||
//极光推送
|
||
implementation 'cn.jiguang.sdk:jpush:3.4.1' // 此处以JPush 3.4.1 版本为例。
|
||
implementation 'cn.jiguang.sdk:jcore:2.2.4' // 此处以JCore 2.2.4 版本为例。
|
||
|
||
implementation 'com.zhpan.library:bannerview:2.6.4'
|
||
implementation "androidx.core:core-ktx:+"
|
||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||
|
||
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
|
||
//更换字体框架
|
||
|
||
}
|
||
repositories {
|
||
mavenCentral()
|
||
}
|