//import com.bingce.AndroidSdk //import com.bingce.SurveyorVersionUtils 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 { namespace 'com.bingce.controlnetwork' useLibrary "org.apache.http.legacy" compileSdk 34 defaultConfig { applicationId "com.bingce.controlnetwork" minSdkVersion 26 targetSdkVersion 34 ndk {} flavorDimensions "custom_made" multiDexEnabled true javaCompileOptions { annotationProcessorOptions { arguments = [ //数据库room "room.schemaLocation": "$projectDir/src/main/schemas".toString() ] } } testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } buildFeatures { viewBinding true } signingConfigs { debug { storeFile file('./debug.keystore') } } def gitCommit = 'git rev-parse --short HEAD'.execute().text.trim() System.out.println("base-java -- version:${gitCommit}") buildTypes { debug { signingConfig signingConfigs.debug buildConfigField "String", "codeVersion", "\"${gitCommit}\"" } release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' buildConfigField "String", "codeVersion", "\"${gitCommit}\"" } } //渠道key // tj61365--天津定制 def flavor = "tj61365" //多渠道打包 flavorDimensions 'custom_made' productFlavors { //天津版本 if (flavor == "tj61365") { // tj61365 { // dimension 'custom_made' // buildConfigField "int", "CHANNEL_TYPE", "com.bingce.AppChannel.CUSTOM_CONTROL_TJ_61365" // versionCode(_versionCode * 100) // versionName _versionName//"1.3.1" // } } } splits { abi { enable true reset() include 'arm64-v8a', 'armeabi-v7a'//,'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' } lintOptions { abortOnError false disable 'GoogleAppIndexingWarning' } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { implementation fileTree(include: ['*.jar', '*.aar'], dir: '../control_common/libs') project.ext.dependencies.each { k, v -> implementation v } project.ext.kapt.each { k, v -> kapt v } implementation 'com.google.android.gms:play-services-auth:20.7.0' implementation project(':control_common') constraints { implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") { because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib") } implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") { because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib") } } def leanCloudVersion = "8.2.16" implementation "cn.leancloud:storage-android:$leanCloudVersion" implementation "cn.leancloud:realtime-android:$leanCloudVersion" implementation 'com.getbase:floatingactionbutton:1.10.1' implementation 'com.github.razir.progressbutton:progressbutton:2.1.0' implementation "com.mikepenz:materialdrawer:6.1.2" testImplementation "junit:junit:4.13.2" androidTestImplementation "androidx.test:runner:1.1.0" def imagepicker = "2.5.6" implementation "com.github.qingmei2:rximagepicker:$imagepicker" // implementation "com.github.qingmei2:rximagepicker_support:$imagepicker" // implementation "com.github.qingmei2:rximagepicker_support_wechat:$imagepicker" }