170 lines
5.3 KiB
Groovy
170 lines
5.3 KiB
Groovy
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 29
|
||
targetSdk 30
|
||
versionCode 1
|
||
versionName "1.0.1"
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||
|
||
multiDexEnabled true
|
||
|
||
ndk {
|
||
abiFilters "arm64-v8a", "armeabi-v7a"
|
||
}
|
||
|
||
vectorDrawables.useSupportLibrary = true
|
||
|
||
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'
|
||
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
|
||
}
|
||
buildFeatures {
|
||
viewBinding true
|
||
}
|
||
}
|
||
|
||
dependencies {
|
||
implementation fileTree(dir: 'lib', include: ['*.jar', '*.aar'])
|
||
testImplementation deps.junit
|
||
androidTestImplementation deps.runner
|
||
androidTestImplementation deps.espresso.core
|
||
|
||
//分包
|
||
implementation deps.androidx.multidex
|
||
|
||
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'
|
||
|
||
implementation group: 'com.alibaba', name: 'fastjson', version: '2.0.56'
|
||
|
||
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 'com.google.guava:guava:31.1-android' // Android 专用版本
|
||
implementation 'com.github.NewHuLe:AppUpdate:v1.7'
|
||
|
||
implementation 'org.bouncycastle:bcprov-jdk15to18:1.77'
|
||
// https://mvnrepository.com/artifact/org.projectlombok/lombok
|
||
implementation 'org.projectlombok:lombok:1.18.38'
|
||
}
|
||
//自动添加X-Library依赖
|
||
apply from: 'x-library.gradle'
|
||
//walle多渠道打包
|
||
apply from: 'multiple-channel.gradle'
|
||
|
||
|