import com.bingce.* apply plugin: 'com.android.application' apply plugin: 'org.jetbrains.kotlin.android' apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-parcelize' apply from: "../control_common/config.gradle" android { useLibrary Libs.httpLegacy compileSdk AndroidSdk.compileSdkVersion namespace App.ControlNetwork.applicationId defaultConfig { minSdkVersion AndroidSdk.minSdkVersion targetSdkVersion AndroidSdk.targetSdkVersion ndk {} testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" multiDexEnabled true javaCompileOptions { annotationProcessorOptions { arguments = [ //数据库room "room.schemaLocation": "$projectDir/src/main/schemas".toString() ] } } } buildFeatures { viewBinding true buildConfig true } signingConfigs { debug { storeFile file('./debug.keystore') } } buildTypes { debug { signingConfig signingConfigs.debug minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } //渠道key //bingce--通用版本 //pro--高级版,驱动马达的版本 //tj61365--天津定制 //intl--国际版 //intl_pro--国际专业版 def flavor = "bingce" //多渠道打包 flavorDimensions = Arrays.asList("custom_made") productFlavors { if (flavor == "bingce") { bingce { dimension 'custom_made' buildConfigField "int", "CHANNEL_TYPE", "com.bingce.AppChannel.CUSTOM_CONTROL_PUBLIC" versionCode _versionCode versionName _versionName } } //其他定制app if (flavor == "pro") { pro {//驱动马达的版本 dimension 'custom_made' buildConfigField "int", "CHANNEL_TYPE", "com.bingce.AppChannel.CUSTOM_CONTROL_PRO" versionCode(_versionCode * 100) versionName _versionName } } if (flavor == "tj61365") { tj61365 {//天津定制 dimension 'custom_made' buildConfigField "int", "CHANNEL_TYPE", "com.bingce.AppChannel.CUSTOM_CONTROL_TJ_61365" versionCode(_versionCode * 100) versionName _versionName } } if (flavor == "intl") { intl {//国际版 dimension 'custom_made' buildConfigField "int", "CHANNEL_TYPE", "com.bingce.AppChannel.CUSTOM_CONTROL_INTERNATIONAL" versionCode(_versionCode * 100) versionName _versionName } } if (flavor == "intl_pro") { intl_pro {//国际专业版 dimension 'custom_made' buildConfigField "int", "CHANNEL_TYPE", "com.bingce.AppChannel.CUSTOM_CONTROL_INTERNATIONAL_PRO" versionCode(_versionCode * 100) versionName _versionName } } } splits { // Split apks on build target ABI, view all options for the splits here: // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits abi { enable true reset() include 'arm64-v8a'//,'armeabi-v7a', 'x86'//, 'x86_64', 'mips','armeabi', } } //为了解决部分第三方库重复打包了META-INF的问题 packagingOptions { exclude 'META-INF/DEPENDENCIES' exclude 'META-INF/LICENSE.txt' exclude 'META-INF/NOTICE.txt' exclude 'META-INF/LICENSE' exclude 'META-INF/NOTICE' exclude 'META-INF/*.kotlin_module' exclude '/META-INF/{AL2.0,LGPL2.1}'//适配compose // exclude 'schemaorg_apache_xmlbeans/**' // exclude 'assets/org/apache/**' // exclude 'org/apache/**' // exclude 'font_metrics.properties' } lintOptions { abortOnError false disable 'GoogleAppIndexingWarning' } } dependencies { implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs') implementation project(':control_common') def moduleName = new ModuleName(project) implementation project(moduleName.bingceModule("appBase")) implementation project(moduleName.bingceModule("repository")) implementation project(moduleName.bingceModule("base")) implementation project(moduleName.bingceModule("leancloud")) implementation project(moduleName.bingceModule("base-java")) implementation project(moduleName.bingceModule("utils")) implementation project(moduleName.bingceModule("coordlib")) implementation project(moduleName.bingceModule("device")) implementation project(moduleName.bingceModule("device-ui")) implementation project(moduleName.bingceModule("rtk")) implementation project(moduleName.bingceModule("totalstation")) implementation project(moduleName.bingceModule("level")) implementation project(moduleName.bingceModule("bcdialog-style")) implementation project(moduleName.openSourceModule("utilcode")) implementation project(moduleName.openSourceModule("colorful"))//选择主题颜色 implementation project(moduleName.openSourceModule("dragExpandGrid"))//管理里的布局 implementation project(moduleName.openSourceModule("lsettingitemlibrary"))//用户信息里 implementation project(moduleName.openSourceModule("spinkit"))//loading控件 导出使用 implementation project(moduleName.openSourceModule("splashview"))//广告view implementation project(moduleName.openSourceModule("poishadowjar"))//导入excel implementation project(moduleName.openSourceModule("safFilePicker"))//选择文件 implementation project(moduleName.openSourceModule("fastjson")) implementation project(moduleName.openSourceModule("agentweb")) implementation project(":opensource:exFilePicker") implementation project(":sdk:tensorFlowTTS")//语音播报 implementation Libs.RxImagePicker.core // implementation Libs.RxImagePicker.support // implementation Libs.RxImagePicker.supportWechat constraints { implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10") { because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib") } implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10") { because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib") } } // implementation "cn.leancloud:storage-android:8.2.5" // implementation "cn.leancloud:realtime-android:8.2.5" implementation Libs.LeanCloud.storage implementation Libs.LeanCloud.realtime testImplementation "junit:junit:4.13.2" androidTestImplementation "androidx.test:runner:1.1.0" androidTestImplementation "androidx.test:rules:1.1.0" androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' implementation 'com.google.android.gms:play-services-auth:20.7.0' project.ext.dependencies.each { k, v -> implementation v } project.ext.kapt.each { k, v -> kapt v } }