| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- //****************************************
- //************ app 壳的配置文件 ************
- //****************************************
- //apply plugin: 'com.android.application'
- //apply plugin: 'kotlin-android'
- //apply plugin: 'com.alibaba.arouter'
- //apply plugin: 'kotlin-android-extensions'
- //apply plugin: 'kotlin-kapt'
- //apply plugin: 'com.google.gms.google-services'
- //apply plugin: 'com.google.firebase.crashlytics'
- plugins {
- id 'com.android.application'
- id 'kotlin-android'
- id 'kotlin-android-extensions'
- id 'kotlin-kapt'
- }
- import com.yc.buildsrc.*
- android {
- compileSdkVersion ProjectBuildConfig.compileSdkVersion
- buildToolsVersion ProjectBuildConfig.buildToolsVersion
- defaultConfig {
- applicationId ProjectBuildConfig.applicationId
- minSdkVersion ProjectBuildConfig.minSdkVersion
- targetSdkVersion ProjectBuildConfig.targetSdkVersion
- versionCode ProjectBuildConfig.versionCode
- versionName ProjectBuildConfig.versionName
- testInstrumentationRunner DependencyConfig.AndroidX.AndroidJUnitRunner
- multiDexEnabled true
- flavorDimensions "versionCode"
- manifestPlaceholders = [qqappid: ProjectBuildConfig.applicationId]
- ndk {
- // 设置支持的SO库架构
- abiFilters 'armeabi-v7a', 'arm64-v8a'
- // abiFilters 'armeabi-v7a',"arm64-v8a" ,'x86_64','x86'
- }
- }
- signingConfigs {
- release {
- storeFile file('../keystores/myimsdk.jks')
- keyAlias "myimsdk"
- storePassword "123456"
- keyPassword "123456"
- v1SigningEnabled true
- v2SigningEnabled true
- }
- debug {
- storeFile file("../keystores/myimsdk.jks")
- keyAlias "myimsdk"
- storePassword "123456"
- keyPassword "123456"
- v1SigningEnabled true
- v2SigningEnabled true
- }
- }
- productFlavors {
- office {}
- vivo {}
- huawei {}
- oppo {}
- huawei {}
- xiaomi {}
- wandoujia {}
- yingyongbao {}
- tianka360 {}
- }
- productFlavors.all {
- //遍历替换所有渠道
- flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]
- }
- // 自定义打包apk的文件名
- android.applicationVariants.all { variant ->
- variant.outputs.all { output ->
- if (outputFileName != null && outputFileName.endsWith('.apk')) {
- outputFileName = "tianka" +
- "_${ProjectBuildConfig.versionCode}" +
- "_${ProjectBuildConfig.versionName}" +
- "_${variant.buildType.name}" +
- "_${variant.productFlavors[0].name}"+
- ".apk"
- }
- }
- }
- buildTypes {
- // // 对应 ALPHA 版本
- debug {
- buildConfigField "String", "VERSION_TYPE", "\"${ProjectBuildConfig.Version.ALPHA}\""
- signingConfig signingConfigs.release
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- beta {
- buildConfigField "String", "VERSION_TYPE", "\"${ProjectBuildConfig.Version.BETA}\""
- // signingConfig signingConfigs.releaseConfig
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- release {
- buildConfigField "String", "VERSION_TYPE", "\"${ProjectBuildConfig.Version.RELEASE}\""
- signingConfig signingConfigs.release
- minifyEnabled true
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- lintOptions {
- checkReleaseBuilds false
- abortOnError false
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
- packagingOptions {
- exclude 'META-INF/DEPENDENCIES'
- exclude 'META-INF/NOTICE'
- exclude 'META-INF/LICENSE'
- exclude 'META-INF/LICENSE.txt'
- exclude 'META-INF/NOTICE.txt'
- jniLibs.useLegacyPackaging = true
- exclude 'lib/x86/**'
- exclude 'lib/x86_64/**'
- }
- }
- repositories {
- flatDir {
- dirs 'libs', '../libs'
- }
- }
- dependencies {
- implementation fileTree(dir: "libs", include: ["*.jar"])
- // if (!ProjectBuildConfig.isAppMode) {
- //
- // } else {
- implementation project(":module_base")
- implementation project(':module_main')
- implementation project(':module_home')
- implementation project(':module_me')
- implementation project(':module_message')
- implementation project(':module_live')
- implementation project(':module_find')
- implementation project(':module_follow')
- // implementation 'com.meituan.android.walle:library:1.1.6'
- // }
- // implementation platform('com.google.firebase:firebase-bom:28.1.0')
- // implementation 'com.google.firebase:firebase-crashlytics-ktx'
- // implementation("com.google.firebase:firebase-analytics-ktx")
- kapt DependencyConfig.GitHub.AutoServiceAnnotations
- // implementation "io.github.didi.dokit:dokitx:3.5.0.1"
- // implementation 'com.squareup.leakcanary:leakcanary-android:1.6.1'
- // compile 'com.github.dreamlivemeng:Clog:1.0.2'
- // releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.1'
- }
|