123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- plugins {
- id 'com.android.application'
- }
- 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_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", "蚂蚁N年陈"
- 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'
- 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 'com.alibaba:fastjson:1.2.76'
- }
|