CanteenTollMachineAppFace5-JYY/app/build.gradle

187 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'
apply plugin: 'img-optimizer'
//打包时记得设置true启用
if (isNeedPackage.toBoolean() && isUseBooster.toBoolean()) {
apply plugin: 'com.didiglobal.booster'
}
android {
compileSdk 30
defaultConfig {
applicationId "org.easydarwin.easypusher"
minSdk 25
targetSdk 30
versionCode 1
versionName "1.0.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
vectorDrawables.useSupportLibrary = true
// 设置支持的屏幕尺寸
resConfigs "zh", "en" // 只打包中文和英文资源
javaCompileOptions {
annotationProcessorOptions {
arguments = [ moduleName : project.getName(),
"room.schemaLocation":
"$projectDir/schemas".toString()]
}
}
}
signingConfigs {
if (isNeedPackage.toBoolean()) {
release {
storeFile file(app_release.storeFile)
storePassword app_release.storePassword
keyAlias app_release.keyAlias
keyPassword app_release.keyPassword
}
}
debug {
storeFile file("./debug.jks")
storePassword "123456"
keyAlias "debug"
keyPassword "123456"
}
release {
//注意该签名文件的路径是以你的moudle文件夹为根路径的而不是project不能写错了
storeFile file("../ks.jks")
storePassword "123456"
keyAlias "key0"
keyPassword "123456"
v1SigningEnabled true
v2SigningEnabled true
}
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// 针对 RK3288 的优化
ndk {
debugSymbolLevel 'SYMBOL_TABLE'
}
if (isNeedPackage.toBoolean()) {
signingConfig signingConfigs.release
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def appID = properties.getProperty("APP_ID_UMENG")
if (appID != null) {
buildConfigField "String", "APP_ID_UMENG", appID
} else {
buildConfigField "String", "APP_ID_UMENG", '""'
}
} else {
signingConfig signingConfigs.debug
buildConfigField "String", "APP_ID_UMENG", '""'
}
}
debug {
debuggable true
minifyEnabled false
signingConfig signingConfigs.debug
buildConfigField "String", "APP_ID_UMENG", '""'
}
}
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
coreLibraryDesugaringEnabled true // 关键配置
}
// 针对 RK3288 的性能优化
dexOptions {
javaMaxHeapSize "4g" // 增加堆内存用于 dex 编译
preDexLibraries true
maxProcessCount 8
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation fileTree(dir: 'lib', include: ['*.jar'])
testImplementation deps.junit
androidTestImplementation deps.runner
androidTestImplementation deps.espresso.core
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
//分包
implementation deps.androidx.multidex
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.databinding:databinding-adapters:3.5.3'
implementation 'com.alibaba.android:vlayout:1.3.0'
//下拉刷新
implementation 'io.github.scwang90:refresh-layout-kernel:2.0.6'
implementation 'io.github.scwang90:refresh-header-material:2.0.6'
//WebView
implementation 'com.github.xuexiangjys.AgentWeb:agentweb-core:1.0.1'
implementation 'com.github.xuexiangjys.AgentWeb:agentweb-download:1.0.1'//选填
//腾讯的键值对存储mmkv
implementation 'com.tencent:mmkv:1.2.10'
//屏幕适配AutoSize
implementation 'me.jessyan:autosize:1.2.1'
//umeng统计
implementation 'com.umeng.umsdk:common:9.3.8'
implementation 'com.umeng.umsdk:asms:1.2.1'
//预加载占位控件
implementation 'me.samlss:broccoli:1.0.0'
implementation 'com.zzhoujay.richtext:richtext:3.0.8'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
//ANR异常捕获
implementation 'com.github.anrwatchdog:anrwatchdog:1.4.0'
//美团多渠道打包
implementation 'com.meituan.android.walle:library:1.1.6'
implementation 'com.jakewharton:butterknife:10.2.0'
implementation 'com.github.getActivity:XXPermissions:13.5'
implementation("cn.hutool:hutool-all:5.8.22")
// https://mvnrepository.com/artifact/com.alibaba/fastjson
implementation group: 'com.alibaba', name: 'fastjson', version: '1.2.83'
// build.gradle 添加dakewharton.threetenabp:threetenabp:1.4.0'
implementation 'com.github.NewHuLe:AppUpdate:v1.7'
implementation 'com.google.guava:guava:27.1-android' // Android 专用版本
implementation 'androidx.room:room-common:2.3.0'
implementation "androidx.room:room-runtime:2.3.0" // Room 库
annotationProcessor "androidx.room:room-compiler:2.3.0" // 注解处理器Java
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5'
implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1'
implementation project(':sdk')
implementation "androidx.work:work-runtime:2.6.0"
implementation 'org.bouncycastle:bcprov-jdk15to18:1.77'
}
//自动添加X-Library依赖
apply from: 'x-library.gradle'
//walle多渠道打包
apply from: 'multiple-channel.gradle'