apply plugin: 'com.android.application' apply plugin: 'android-aspectjx' apply plugin: 'com.huawei.agconnect' // HMS SDK gradle 插件 apply plugin: "com.tencent.android.tpns" def releaseTime() { return new Date().format("MMdd_HHmm", TimeZone.getTimeZone("GMT+8:00")) } android { compileSdkVersion 31 buildToolsVersion "29.0.3" defaultConfig { minSdkVersion 21 targetSdkVersion 29 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" javaCompileOptions { annotationProcessorOptions { arguments = [AROUTER_MODULE_NAME: project.getName()] } } multiDexEnabled true flavorDimensions "default" ndk { // 设置支持的SO库架构 abiFilters 'arm64-v8a', 'x86_64', 'armeabi-v7a'//, 'x86_64', 'armeabi-v7a', 'x86', } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } signingConfigs { config { keyAlias 'key' keyPassword 'Hx6248**' storeFile file('../mugolive.jks') storePassword 'Hx6248**' } } buildTypes { release { minifyEnabled true//混淆 shrinkResources true //删除无效引用 signingConfig signingConfigs.config proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { minifyEnabled false//混淆 signingConfig signingConfigs.config proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } sourceSets { main { jniLibs.srcDirs = ['libs'] } } lintOptions { disable 'GoogleAppIndexingWarning'//忽略 Google Search(放于每个module的build.gradle文件中) } buildFeatures{ dataBinding = true } productFlavors { //Mugo mugo { applicationId "com.mugo.live" versionCode 1 versionName "1.0" manifestPlaceholders = [ OpenInstallAppKey: "a4p4z6",//OpenInstall JPUSH_PKGNAME : applicationId,//极光 JPUSH_CHANNEL : "developer-default", JPUSH_APPKEY : "84fdb198614f114ca8be6738", Tencent_BUGLY : "12289a52b6",//腾讯bugly Tencent_Map : "TYPBZ-FGGWJ-5JQFS-FLH5R-WXK5V-NSFGQ",//腾讯地图 WX_PAY_APP_ID : "wx9477e94703095c92",//微信支付,AppId XG_ACCESS_ID : "1580010621",//腾讯TPNS accessid XG_ACCESS_KEY : "AW9JXX7NHY6M",//腾讯TPNS accesskey MI_APPID : "",//小米 AppID MI_APPKEY : "",//小米 AppKey VIVO_APPID : "",// vivo AppID VIVO_APPKEY : "",// vivo AppKey OPPO_APPID : "",// oppo AppID OPPO_APPKEY : ""// oppo AppKey ] buildConfigField 'String', 'SERVER_URL', '"http://yydsappapi.samsunghook.com"' // buildConfigField 'String', 'SERVER_URL', '"http://samsunghook.pro"' } } applicationVariants.all { variant -> variant.outputs.all { def fileName = productFlavors.name[0] + "_" + productFlavors.versionName[0] + "_" + releaseTime() + ".apk" outputFileName = fileName } } } repositories { flatDir { dirs 'libs', '../libs' } maven { url "https://mvn.mob.com/android" } } aspectjx { //排除所有package路径中包含`android.support`的class文件及库(jar文件) //消除Aspectj对支付宝影响 exclude 'com.alipay', 'com.google' } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') //noinspection GradleCompatible implementation 'com.android.support:design:23.1.1' implementation 'androidx.appcompat:appcompat:1.1.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' implementation project(':KlcVoiceLive') implementation project(':KlcLive') implementation project(':KlcUtils') implementation project(':KlcBase') implementation project(':KlcBeans') implementation project(':KlcLive') implementation project(':KlcLogin') implementation project(':KlcLoginPage') implementation project(':KlcTrend') implementation project(':KlcFans') implementation project(':KlcMoney') implementation project(':KlcLiveCommon') implementation project(':KlcVideoCommon') implementation project(':KlcCommonView') implementation project(':KlcMain') implementation project(':KlcMainPage') implementation project(':KlcMessage') implementation project(':KlcImJmessage') implementation project(':KlcShortVideo') implementation project(':KlcHomePage') implementation project(':KlcInvitation') implementation project(':KlcMe') implementation project(':KlcPush') implementation project(':KlcShopping') annotationProcessor 'com.alibaba:arouter-compiler:1.5.2' api 'com.alibaba:arouter-api:1.5.2' }