123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- apply plugin: 'com.android.application'
- //获取local.properties的内容
- Properties properties = new Properties()
- properties.load(project.rootProject.file('local.properties').newDataInputStream())
- //打包时间
- def releaseTime() {
- return new Date().format("yyyy-MM-dd-HH-mm-ss")
- }
- android {
- compileSdkVersion 31
- buildToolsVersion "29.0.3"
- defaultConfig {
- applicationId "com.syjk.watch.dealer"
- minSdkVersion 23
- targetSdkVersion 31
- versionCode 1
- versionName rootProject.ext.versions['watch-sdk-version']
- flavorDimensions ""
- ndk {
- // 设置支持的SO库架构
- abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a'//, 'armeabi','x86', 'x86_64'
- }
- javaCompileOptions {
- annotationProcessorOptions {
- arguments = [AROUTER_MODULE_NAME: project.getName()]
- }
- }
- multiDexEnabled true
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- //动态打包
- signingConfigs {
- config {
- storeFile file(properties.getProperty("keystroe_storeFile"))
- storePassword properties.getProperty("keystroe_storePassword")
- keyAlias properties.getProperty("keystroe_keyAlias")
- keyPassword properties.getProperty("keystroe_keyPassword")
- }
- }
- productFlavors {
- syjk_dev {
- // 每个环境包名不同
- applicationId "com.syjk.watch.dealer"
- versionCode rootProject.ext.versions['version-code']
- versionName rootProject.ext.versions['watch-sdk-version']//版本和sdk版本保持一致
- // 动态添加 string.xml 字段;
- // 注意,这里是添加,在 string.xml 不能有这个字段,会重名!!!
- resValue "string", "app_name", "智慧苏药-开发版"
- // 动态修改 常量 字段
- buildConfigField "String", "API_HOST", '"http://njmb-gk.hiseemedical.com"'
- //管控api已替换
- buildConfigField "String", "BUGLY_APPID", '"ccd8eb91cb"'//已替换
- buildConfigField "String", "LOG_TAG", '"hopital_online_wdrm_dev"'//已替换
- }
- syjk {
- // 每个环境包名不同
- applicationId "com.syjk.watch.dealer"
- versionCode rootProject.ext.versions['version-code']
- versionName rootProject.ext.versions['watch-sdk-version']//版本和sdk版本保持一致
- // 动态添加 string.xml 字段;
- // 注意,这里是添加,在 string.xml 不能有这个字段,会重名!!!
- resValue "string", "app_name", "智慧苏药"
- // 动态修改 常量 字段
- // buildConfigField "String", "API_HOST", '"http://njmb-gk.hiseemedical.com"'// 测试环境
- buildConfigField "String", "API_HOST", '"https://business.tianyiyun-nj.com"'// 正式环境
- //管控api已替换
- buildConfigField "String", "BUGLY_APPID", '"ccd8eb91cb"'//已替换
- buildConfigField "String", "LOG_TAG", '"hopital_online_wdrm_dev"'//已替换
- }
- }
- buildTypes {
- release {
- // 开启混淆
- minifyEnabled false
- // 开启ZipAlign优化
- zipAlignEnabled true
- //资源压缩
- shrinkResources false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- // 批量打包
- applicationVariants.all { variant ->
- variant.outputs.all {
- outputFileName = "${releaseTime()}.apk"
- }
- }
- }
- debug {
- // minifyEnabled true
- // // 开启ZipAlign优化
- // zipAlignEnabled true
- // //资源压缩
- // shrinkResources true
- // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- signingConfig signingConfigs.config
- }
- }
- compileOptions {
- sourceCompatibility = 1.8
- targetCompatibility = 1.8
- }
- sourceSets {
- main {
- jniLibs.srcDirs = ['libs']
- }
- }
- }
- //使用aar时必须要设置的
- repositories {
- flatDir {
- dirs 'libs'
- }
- }
- dependencies {
- implementation fileTree(dir: "libs", include: ["*.jar"])
- implementation 'androidx.appcompat:appcompat:1.1.0'
- implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
- implementation(name: 'industry-service', ext: 'aar')
- implementation(name: 'industry-connectionui', ext: 'aar')
- implementation(name: 'industry-client', ext: 'aar')
- implementation 'org.bouncycastle:bcprov-jdk15to18:1.70'
- implementation 'net.zetetic:android-database-sqlcipher:4.5.1'
- // implementation 'com.google.code.gson:gson:2.9.0'
- // implementation 'com.mikesamuel:json-sanitizer:1.2.2'
- implementation 'commons-io:commons-io:2.11.0'
- implementation 'com.huawei.hms:network-grs:6.0.11.300'
- implementation 'com.huawei.android.hms:security-encrypt:1.2.0.307'
- implementation 'com.huawei.android.hms:security-ssl:1.2.0.306'
- implementation(name: 'libble-0.5', ext: 'aar')
- implementation(name: 'libdfu-1.5', ext: 'aar')
- implementation(name: 'libfastdfu-0.5', ext: 'aar')
- implementation(name: 'vpprotocol-2.2.47.15', ext: 'aar')
- // 日志
- implementation 'com.orhanobut:logger:2.2.0'
- // 路由
- implementation 'com.alibaba:arouter-api:1.5.2'
- implementation files('libs/vpbluetooth_1.0.4.jar')
- implementation files('libs/libcomx-0.5.jar')
- annotationProcessor "com.alibaba:arouter-compiler:1.5.2"
- // 事件
- implementation 'org.greenrobot:eventbus:3.1.1'
- // 屏幕适配
- implementation 'me.jessyan:autosize:1.2.1'
- // RxJava
- implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
- implementation 'io.reactivex.rxjava3:rxjava:3.1.5'
- // RxLife
- implementation 'com.trello.rxlifecycle4:rxlifecycle:4.0.2'
- implementation 'com.trello.rxlifecycle4:rxlifecycle-components:4.0.2'
- implementation 'com.trello.rxlifecycle4:rxlifecycle-android:4.0.2'
- //Rxbinding
- implementation 'com.jakewharton.rxbinding4:rxbinding-material:4.0.0'
- // 状态栏
- implementation 'com.jaeger.statusbarutil:library:1.5.1'
- // 腾讯x5浏览器
- implementation 'com.tencent.tbs.tbssdk:sdk:43939'
- // network
- implementation 'com.squareup.okhttp3:okhttp:3.10.0'
- implementation 'com.squareup.retrofit2:retrofit:2.9.0'
- implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
- implementation 'com.squareup.retrofit2:adapter-rxjava3:2.9.0'
- implementation 'com.github.franmontiel:PersistentCookieJar:v1.0.1'
- implementation 'com.github.ihsanbal:LoggingInterceptor:3.0.0'
- //万能Recycler适配器
- implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.50'
- //Recycler刷新控件
- implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0'
- // glide
- implementation 'com.github.bumptech.glide:glide:4.8.0'
- annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
- implementation 'jp.wasabeef:glide-transformations:4.0.1'
- // orm
- implementation 'com.github.satyan:sugar:1.5'
- implementation 'com.jakewharton:butterknife:10.2.3'
- annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
- implementation 'com.rengwuxian.materialedittext:library:2.1.4'
- implementation 'com.tencent.bugly:crashreport:3.4.4'
- // 权限管理
- implementation 'com.qw:soulpermission:1.2.2'
- ///导航栏
- implementation 'com.github.hackware1993:magicindicator:1.5.0'
- //统计图
- implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
- implementation 'com.pnikosis:materialish-progress:1.7'
- implementation 'com.github.lihangleo2:ShadowLayout:3.2.4'
- implementation 'com.google.android:flexbox:1.0.0'
- implementation 'com.tencent.mm.opensdk:wechat-sdk-android:+'
- implementation 'com.github.mcxtzhang:SwipeDelMenuLayout:V1.3.0'
- implementation 'com.xw.repo:bubbleseekbar:3.20-lite'
- implementation 'com.github.youlookwhat:WebProgress:1.1.0'
- }
|