Files
FLYSN/app/build.gradle
Administrator cf253e460c update:2020.10.21
fix:蓝牙文件传输管控改为蓝牙开关管控
add:摄像头管控,影音格式管控,电话功能管控
2020-10-21 18:47:57 +08:00

144 lines
4.9 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 "SnInfo"
}
def releaseTime() {
return new Date().format("yyyyMMddHHmm", TimeZone.getDefault())
}
android {
compileSdkVersion 28
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.info.sn"
minSdkVersion 23
targetSdkVersion 28
versionCode 24
versionName "1.2.4"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
//选择要添加的对应 cpu 类型的 .so 库。
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a',"x86"
// 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
}
manifestPlaceholders = [
JPUSH_PKGNAME: applicationId,
JPUSH_APPKEY : "edf9cec22731b8b2fed56ee6", //JPush 上注册的包名对应的 Appkey.
JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
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)
}
}
}
}
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
// implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.zxing:core:3.2.1'
implementation 'cn.jiguang.sdk:jpush:3.3.4' // 此处以JPush 3.3.4 版本为例。
implementation 'cn.jiguang.sdk:jcore:2.1.2' // 此处以JCore 2.1.2 版本为例。
//动态权限框架
implementation 'com.hjq:xxpermissions:6.0'
//http框架
implementation 'com.lzy.net:okgo:3.0.4'
implementation 'com.lzy.net:okrx:0.1.2'
implementation 'com.lzy.net:okserver:2.0.5'
implementation 'com.alibaba:fastjson:1.2.21'
implementation 'com.blankj:utilcode:1.26.0'
implementation 'com.arialyy.aria:core:3.8.5'
annotationProcessor 'com.arialyy.aria:compiler:3.8.5'
implementation "org.java-websocket:Java-WebSocket:1.4.1"
//高德地图定位
implementation 'com.amap.api:location:5.1.0'
}