Files
CubeAoleyunSN/app/build.gradle
Administrator c99f828dcf update:2020.06.03
fix:修复app禁止升级出现的问题
add:增加桌面图标隐藏功能
2020-06-06 14:04:00 +08:00

173 lines
6.1 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'
def appName() {
return "DeviceInfo"
}
def releaseTime() {
return new Date().format("yyyyMMdd", TimeZone.getDefault())
}
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.jiaoguanyi.appstore"
minSdkVersion 20
targetSdkVersion 29
versionCode 142
versionName "2.9.9"//测试jiaoguanyi.cn
// versionCode 128
// versionName "2.0.0.8"// 正式jiaoguanyi.com 双数正式 单数测试
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
packagingOptions {
exclude 'META-INF/rxjava.properties'
}
/*********************************极光推送************************************/
manifestPlaceholders = [
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
JPUSH_APPKEY : "20f70bbeb78bad23eddd08d0", //JPush上注册的包名对应的appkey.
JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
]
/*********************************极光推送end************************************/
}
lintOptions {
checkReleaseBuilds false
}
dexOptions {
jumboMode true
}
//签名
signingConfigs {
debug {
storeFile file("src/main/doc/xueshibaoos.jks")
storePassword "123456"
keyAlias "xueshibaoos"
keyPassword "123456"
v2SigningEnabled false
}
release {// 签名文件
storeFile file("src/main/doc/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 ->
def outputFile = output.outputFile
if (outputFile != null) {
def fileName = "${appName()}-V${defaultConfig.versionName}-${releaseTime()}.apk"
output.outputFileName = new File(outputFile.parent, 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(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:multidex:1.0.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '27.1.1'
}
}
}
}
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
// implementation 'me.grantland:autofittextview:0.2.1'
// implementation 'com.github.bumptech.glide:glide:4.0.0'
// annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0'
implementation 'com.alibaba:fastjson:1.2.18'
implementation 'com.lzy.net:okgo:2.1.4'
implementation 'com.lzy.net:okrx:0.1.2'
implementation 'com.lzy.net:okserver:1.1.3'
// implementation 'de.greenrobot:eventbus:2.4.1'
implementation 'com.squareup.okhttp3:okhttp:3.10.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'
implementation 'io.reactivex.rxjava2:rxjava:2.0.7'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'com.google.code.gson:gson:2.8.0'
// implementation 'cn.jiguang:jpush:2.2.0'
implementation 'cn.jiguang.sdk:jpush:3.5.6' // 此处以JPush 3.5.6 版本为例。
implementation 'cn.jiguang.sdk:jcore:2.2.8' // 此处以JCore 2.2.8 版本为例。
implementation "com.github.yjfnypeu:UpdatePlugin:3.0.1"
implementation 'com.blankj:utilcode:1.23.7'
implementation 'com.arialyy.aria:core:3.8.5'
annotationProcessor 'com.arialyy.aria:compiler:3.8.5'
implementation 'com.github.tianma8023:NetDetector:v0.2.0'
implementation "org.java-websocket:Java-WebSocket:1.4.1"
implementation 'com.google.zxing:core:3.2.1'
implementation 'com.hjq:xxpermissions:6.0'
}