123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- plugins {
- id 'com.android.application'
- }
- apply from : '../common.gradle'
- android {
- signingConfigs {
- config rootProject.ext.build["signingConfig"]
- }
- compileSdkVersion rootProject.ext.android["compileSdkVersion"]
- buildToolsVersion rootProject.ext.android["buildToolsVersion"]
- defaultConfig {
- applicationId "com.dawn.pack"
- minSdkVersion rootProject.ext.android["minSdkVersion"]
- targetSdkVersion rootProject.ext.android["targetSdkVersion"]
- versionCode rootProject.ext.android["versionCode"]
- versionName rootProject.ext.android["versionName"]
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- multiDexEnabled true
- // 混淆配置
- proguardFiles 'proguard-sdk.pro', 'proguard-app.pro'
- // 日志打印开关
- buildConfigField('boolean', 'LOG_DEBUG', '' + LOG_DEBUG + '')
- // 测试包下的 BuglyId
- buildConfigField('String', 'BUGLY_ID', '"' + BUGLY_ID + '"')
- // 测试服务器的主机地址
- buildConfigField('String', 'SERVER_HOST', '"' + SERVER_HOST + '"')
- }
- buildTypes {
- debug {
- // 调试模式开关
- debuggable true
- jniDebuggable true
- zipAlignEnabled true // Zipalign优化
- shrinkResources false // 移除无用的resource文件
- signingConfig signingConfigs.config
- ndk {
- abiFilters 'armeabi-v7a'
- }
- }
- preview.initWith(debug)
- release {
- // 调试模式开关
- debuggable false
- jniDebuggable false
- zipAlignEnabled true // Zipalign优化
- shrinkResources true // 移除无用的resource文件
- minifyEnabled true
- signingConfig signingConfigs.config
- ndk {
- abiFilters 'armeabi-v7a', 'arm64-v8a'
- }
- }
- }
- packagingOptions {
- // 剔除这个包下的所有文件(不会移除签名信息)
- exclude 'META-INF/*******'
- }
- applicationVariants.all { variant ->
- variant.outputs.all { output ->
- outputFileName = "CloudClinic_Pack_" + 'V' + variant.versionName + '_' + variant.buildType.name
- if (variant.buildType.name == buildTypes.release.getName()) {
- outputFileName += '_' + new Date().format('MMdd')
- }
- outputFileName += '.apk'
- }
- }
- dataBinding {
- enabled true
- }
- }
- dependencies {
- // 依赖 libs 目录下所有的 jar 和 aar 包
- implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
- implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'com.google.android.material:material:1.2.1'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
- testImplementation 'junit:junit:4.+'
- androidTestImplementation 'androidx.test.ext:junit:1.1.1'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
- implementation project(path: ':common')
- implementation 'com.tencent.bugly:crashreport:3.4.4'
- //其中latest.release指代最新Bugly SDK版本号,也可以指定明确的版本号,例如2.1.9
- implementation 'com.tencent.bugly:nativecrashreport:3.9.2'
- implementation 'com.jakewharton.timber:timber:4.7.1'
- implementation 'com.github.zhouzhuo810:ZzImageBox:1.3.4'
- }
|