在項目主module下面添加下面的代碼,紅色部分代碼
apply plugin: 'com.android.application'apply plugin: 'com.neenbedankt.android-apt'def bugtagsConfig = rootPRoject.ext.bugtagsConfig;android { // for bugtags useLibrary 'org.apache.http.legacy' compileSdkVersion COMPILE_SDK_VERSION buildToolsVersion BUILD_TOOLS_VERSION dataBinding { enabled = true } defaultConfig { applicationId "com.mem.MacaoLife" minSdkVersion MIN_SDK_VERSION targetSdkVersion TARGET_SDK_VERSION versionCode APP_VERSION_CODE versionName APP_VERSION_NAME //是否禁用外賣模塊 buildConfigField "boolean", "DIABLE_TAKEAWAY", "true" //bugtags app key信息 buildConfigField "String", "BUGTAGS_APP_KEY", "/"${bugtagsConfig.BUGTAGS_APP_KEY}/"" ndk { // 設置支持的 SO 庫構架 abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64', 'mWord "123456" keyAlias "demo" keyPassword "123456" } } buildTypes { debug { signingConfig signingConfigs.debug } release { minifyEnabled false signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' applicationVariants.all { variant -> variant.outputs.each { output -> def outputFile = output.outputFile if (outputFile != null && outputFile.name.endsWith('.apk')) { // 輸出apk名稱為release_v1.0_2015-01-15.apk def fileName = "release_v${defaultConfig.versionName}_${releaseTime()}.apk" output.outputFile = new File(outputFile.parent, fileName) } } } } } lintOptions { checkReleaseBuilds false // Or, if you prefer, you can continue to check for errors in release builds, // but continue the build even when errors are found: abortOnError false }}def releaseTime() { return new Date().format("yyyy-MM-dd-hh-mm", TimeZone.getDefault())}//應用 Bugtags 插件apply plugin: 'com.bugtags.library.plugin'//Bugtags 插件配置bugtags { //自動上傳符號表功能配置,如果需要根據 build varint 配置,請參考幫助中心->符號表->Android 符號表->配置自動上傳符號表 appKey bugtagsConfig.BUGTAGS_APP_KEY //這里是你的 appKey appSecret bugtagsConfig.BUGTAGS_APP_SECRET //這里是你的 appSecret,管理員在設置頁可以查看 mappingUploadEnabled true}dependencies { apt 'org.parceler:parceler:1.1.6' compile fileTree(include: ['*.jar'], dir: 'libs') compile project(':lib') compile project(':thirdsdk:baiduma
新聞熱點
疑難解答