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" flavorDimensions "versionCode" } 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 { // 服务器地址 // 通用 buildConfigField("String", "BASE_URL", "\"https://hhomc.hz-hanghui.com:8096/\"") // buildConfigField("String", "BASE_URL_WEBSOCKET", "\"wss://hhomc.hz-hanghui.com:18096/\"") buildConfigField("String", "BASE_URL_WEBSOCKET", "\"ws://115.227.34.58:19086/\"") // 故宫 // buildConfigField("String", "BASE_URL", "\"https://aiotota.dpm.org.cn/\"") // buildConfigField("String", "BASE_URL_WEBSOCKET", "\"wss://aiotota.dpm.org.cn/\"") buildConfigField("String", "BASE_API_URL", "\"\"") // buildConfigField("String", "LOG_FILE_AROME", "\"/storage/emulated/0/Android/data/com.hh.arome/files\"") // buildConfigField("String", "PACKAGE_NAME_AROME", "\"com.hh.arome\"") resValue "string", "app_name", "HHOMC" 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 = "hhomc_v${defaultConfig.versionName}_${variant.productFlavors[0].name}.apk" outputFileName = fileName_new } } } } yufabu { applicationIdSuffix ".yufabu" buildConfigField("String", "BASE_URL", "\"http://192.168.11.9:9086/\"") buildConfigField("String", "BASE_URL_WEBSOCKET", "\"ws://192.168.11.9:19086/\"") buildConfigField("String", "BASE_API_URL", "\"\"") // buildConfigField("String", "LOG_FILE_AROME", "\"/storage/emulated/0/Android/data/com.hh.arome.yufabu/files\"") // buildConfigField("String", "PACKAGE_NAME_AROME", "\"com.hh.arome.yufabu\"") // 测试的IM信息 // buildConfigField("int", "TIM_SDKAPPID", "1400803088") // buildConfigField("String", "TIM_SECRETKEY", "\"f942e1545dd5465c6d54fe68d2c42d9af424a2e7f3ed84133bc2f7b40191b271\"") resValue "string", "app_name", "测试HHOMC" 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", "\"http://192.168.11.9:9086/\"") buildConfigField("String", "BASE_URL_WEBSOCKET", "\"ws://192.168.11.9:19086/\"") buildConfigField("String", "BASE_API_URL", "\"\"") // buildConfigField("String", "LOG_FILE_AROME", "\"/storage/emulated/0/Android/data/com.hh.arome.test/files\"") // buildConfigField("String", "PACKAGE_NAME_AROME", "\"com.hh.arome.test\"") resValue "string", "app_name", "开发HHOMC" minifyEnabled false shrinkResources false jniDebuggable true debuggable true signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } // 与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 } } dependencies { implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'com.google.android.material:material:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation files('libs\\OrbbecSSDK_1.0.0.3_0f2b082_240327.jar') implementation files('libs\\RocoApiManager.jar') testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' // 添加base依赖 implementation project(path: ':lib_base') // 重启设备 implementation files('libs/PosUtil.jar') implementation 'com.neovisionaries:nv-websocket-client:2.2' implementation 'org.java-websocket:Java-WebSocket:1.3.7' implementation 'com.google.code.gson:gson:2.8.8' // okHttp // implementation 'com.squareup.okhttp3:okhttp:3.4.1' // implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1' // 断点下载 // implementation 'com.yaoxiaowen:download:1.4.1' implementation project(path: ':downloaderHelper') implementation 'com.alibaba:fastjson:1.2.76' implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.72" //紫鹏X5——jar包 implementation files('libs\\YNHAPI-20230413.jar') }