plugins { id 'com.android.application' id 'kotlin-android' id 'kotlin-android-extensions' } android { compileSdkVersion rootProject.ext.android["compileSdkVersion"] buildToolsVersion rootProject.ext.android["buildToolsVersion"] defaultConfig { applicationId rootProject.ext.android["applicationId"] minSdkVersion rootProject.ext.android["minSdkVersion"] targetSdkVersion rootProject.ext.android["targetSdkVersion"] versionCode rootProject.ext.android["versionCode"] versionName rootProject.ext.android["versionName"] testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles 'consumer-rules.pro' flavorDimensions "versionCode" ndk { // abiFilters "armeabi-v7a","armeabi" // abiFilters "armeabi-v7a","arm64-v8a" abiFilters "arm64-v8a" } } signingConfigs { debug { storeFile file('./src/main/jks/hh-face.jks') storePassword 'Nqj##117521' keyAlias 'hemile' keyPassword 'Nqj##117521' } release { storeFile file('./src/main/jks/hh-face.jks') storePassword 'Nqj##117521' keyAlias 'hemile' keyPassword 'Nqj##117521' } } buildTypes { // 因为支付宝刷脸需要包名一致,所以以后仅使用release版本,不再使用debug版本 release { // 服务器地址 // 正式 buildConfigField("String", "BASE_URL", "\"https://noise.hz-hanghui.com:8088/yx-fyzd/\"") // 测试 // buildConfigField("String", "BASE_URL", "\"https://test.hz-hanghui.com:18890/zhejiang-fyzd/\"") buildConfigField("String", "BASE_API_URL", "\"hanghui-server-platform/\"") buildConfigField("String", "BASE_URL_OMC", "\"https://hhomc.hz-hanghui.com:8096/\"") // aidl服务端包名 buildConfigField("String", "AIDL_SERVER_APP_PACKAGE_NAME", "\"com.hh.hhomc\"") resValue "string", "app_name", "GRBJ" signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' shrinkResources false minifyEnabled false zipAlignEnabled true debuggable true jniDebuggable true testCoverageEnabled false // 3.0后的配置 applicationVariants.all { variant -> variant.outputs.all { output -> def outputFile = output.outputFile if (outputFile != null && outputFile.name.endsWith('.apk')) { // 输出apk名称为jjb_v1.0_wandoujia.apk def fileName_new = "hh_baidu_face_v${defaultConfig.versionName}_${variant.productFlavors[0].name}.apk" outputFileName = fileName_new } } } } yufabu { applicationIdSuffix ".yufabu" buildConfigField("String", "BASE_URL", "\"http://192.168.11.87:8081/\"") buildConfigField("String", "BASE_API_URL", "\"hanghui/outapi/\"") buildConfigField("String", "BASE_URL_OMC", "\"http://192.168.11.9:9086/\"") // aidl服务端包名 buildConfigField("String", "AIDL_SERVER_APP_PACKAGE_NAME", "\"com.hh.hhomc.yufabu\"") // 测试的IM信息 // buildConfigField("int", "TIM_SDKAPPID", "1400803088") // buildConfigField("String", "TIM_SECRETKEY", "\"f942e1545dd5465c6d54fe68d2c42d9af424a2e7f3ed84133bc2f7b40191b271\"") resValue "string", "app_name", "测试HHArome" minifyEnabled false shrinkResources false jniDebuggable true debuggable true signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { applicationIdSuffix ".test" // buildConfigField("String", "BASE_URL", "\"https://tx.hz-hanghui.com:8088/\"") // buildConfigField("String", "BASE_API_URL", "\"hanghui-server-platform/\"") // // buildConfigField("String", "BASE_URL_OMC", "\"https://hhomc.hz-hanghui.com:8096/\"") buildConfigField("String", "BASE_URL", "\"https://test.hz-hanghui.com:18890/\"") buildConfigField("String", "BASE_API_URL", "\"hanghui-server-platform/\"") // buildConfigField("String", "BASE_URL", "\"http://192.168.11.17:8081/\"") // buildConfigField("String", "BASE_API_URL", "\"hanghui/outapi/\"") buildConfigField("String", "BASE_URL_OMC", "\"http://192.168.11.9:9086/\"") // aidl服务端包名 buildConfigField("String", "AIDL_SERVER_APP_PACKAGE_NAME", "\"com.hh.hhomc.test\"") resValue "string", "app_name", "开发HHArome" signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' shrinkResources false minifyEnabled false zipAlignEnabled true debuggable true jniDebuggable true testCoverageEnabled false } } // 与buildTypes中输出签名后的apk对应 productFlavors { app {} } productFlavors.all { flavor -> flavor.manifestPlaceholders = [CHANNEL_VALUE: name] } dexOptions { javaMaxHeapSize "4g" } repositories { flatDir { dirs 'libs' } } sourceSets { main { jniLibs.srcDirs = ['libs'] } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } ndkVersion '21.0.6113669' // 去除重复的so packagingOptions { // pickFirsts:当出现重复文件,会使用第一个匹配的文件打包进入apk pickFirst 'lib/armeabi-v7a/libandroid_serial_port.so' pickFirst 'lib/armeabi-v7a/libserial_port.so' pickFirst 'lib/armeabi/libserial_port.so' pickFirst 'lib/arm64-v8a/libc++_shared.so' pickFirst 'lib/armeabi-v7a/libc++_shared.so' } } dependencies { implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs') implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'com.google.android.material:material:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation project(path: ':SeriaApp') testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.72" // 添加base依赖 implementation project(path: ':lib_base') // usb串口通信 implementation 'com.github.felHR85:UsbSerial:4.5.2' // 百度刷脸---begin implementation project(path: ':datalibrary') implementation project(path: ':facelibrary') implementation project(path: ':gatelibrary') implementation project(path: ':identifylibrary') implementation project(path: ':registerlibrary') implementation project(path: ':settinglibrary') implementation project(path: ':lib_baidu_face') // 百度刷脸--end implementation 'com.neovisionaries:nv-websocket-client:2.6' implementation 'org.java-websocket:Java-WebSocket:1.3.7' // implementation 'com.github.centerzx:ShapeBlurView:1.0.5' // implementation project(path: ':blurview') // 高斯模糊 // implementation 'jp.wasabeef:glide-transformations:4.3.0' // 天波 // implementation files('libs/posutil_sdk_20231016.jar') implementation files('libs/posutil_sdk_20231226.jar') }