import com.bingce.AndroidSdk import com.bingce.App import com.bingce.Libs import com.bingce.ModuleName 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 { versionName "1.0.1" versionCode 1 applicationId "com.bingce.controlnetwork.pla" 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' //release版本输出包名自动追加版本号和版本名称 applicationVariants.all { variant -> variant.outputs.all { def createTime = new Date().format("YYYY-MM-dd-HH-mm-ss", TimeZone.getTimeZone("GMT+08:00")) // app包名称 outputFileName = "app_v" + defaultConfig.versionName + "_" + createTime + ".apk" } } } } 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 } }