plugins { id 'com.android.application' id 'kotlin-android' id 'kotlin-kapt' id 'kotlin-android-extensions' } android { compileSdkVersion 30 buildToolsVersion "30.0.3" signingConfigs { debug { storeFile file('dhhy-cargo-keys') storePassword 'dhhy123456p' keyAlias 'key0' keyPassword 'dhhy123456p' } config { keyAlias 'key0' keyPassword 'dhhy123456p' storeFile file('dhhy-cargo-keys') storePassword 'dhhy123456p' } release { keyAlias 'key0' keyPassword 'dhhy123456p' storeFile file('dhhy-cargo-keys') storePassword 'dhhy123456p' } } defaultConfig { applicationId "com.oneclouds.cargo" minSdkVersion 23 targetSdkVersion 30 versionCode 34 versionName "3.1.4" flavorDimensions "CHANNEL_VALUE" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" ndk { //设置支持的SO库架构(开发者可以根据需要,选择一个或多个平台的so) abiFilters "armeabi-v7a", "arm64-v8a" } // javaCompileOptions { // // annotationProcessorOptions { // includeCompileClasspath = true // arguments = [ moduleName : project.getName() ] // } // } } allprojects { repositories { maven { url "https://jitpack.io" } } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } productFlavors { dev { applicationId "com.oneclouds.cargo" manifestPlaceholders = [CHANNEL_VALUE: "货主端(测试)", // app_icon : "@drawable/head_defaut", JPUSH_PKGNAME: applicationId, //JPush 上注册的包名对应的 Appkey. JPUSH_APPKEY : "fba6f55621c670d8c1fe9191", //暂时填写默认值即可. JPUSH_CHANNEL: "developer-n"] // buildConfigField("String", "BASE_URL", "\"https://app.test.dahehuoyun.com/api/\"") buildConfigField("String", "BASE_URL", "\"http://192.168.1.118:8080/api/\"") buildConfigField "boolean", "isTest", "true" //APP名称,可以在androidMainfest中引用 resValue "string", "appName", "货主端测试" } prod { applicationId "com.oneclouds.cargo" manifestPlaceholders = [CHANNEL_VALUE: "货主端", // app_icon : "@drawable/ysxy", JPUSH_PKGNAME: applicationId, //JPush 上注册的包名对应的 Appkey. JPUSH_APPKEY : "fba6f55621c670d8c1fe9191", //暂时填写默认值即可. JPUSH_CHANNEL: "developer-default"] buildConfigField("String", "BASE_URL", "\"http://app.dahehuoyun.com/api/\"") buildConfigField "boolean", "isTest", "false" resValue "string", "appName", "货主端" } } // android.applicationVariants.all { variant -> // variant.outputs.all { // def date = new Date().format("MMdd_HH-mm" , TimeZone.getTimeZone("GMT+08")) // if(variant.buildType.name.equals('release')){ // outputFileName = "dhhy-cargo-"+date+"-${versionName}.apk" // } // } // } android.applicationVariants.all { variant -> variant.outputs.all { //获取渠道名称 def isText = variant.productFlavors[0].properties.get("buildConfigFields").getAt("isTest").properties.get("value") def appName = null if (isText == "true") { appName = '货主端测试_' } else { appName = '货主端正式_' } def date = new Date().format("MMdd_HH-mm" , TimeZone.getTimeZone("GMT+08")) variant.outputs.all { outputFileName = appName+date+"_${variant.buildType.name}_v${defaultConfig.versionName}.apk" } } } } dependencies { implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'com.google.android.material:material:1.2.1' implementation 'androidx.constraintlayout:constraintlayout:2.0.1' // implementation 'org.jetbrains:annotations:15.0' implementation 'top.zibin:Luban:1.1.3' //角标文字 implementation 'com.haozhang.libary:android-slanted-textview:1.2' //加载 implementation 'com.scwang.smart:refresh-layout-kernel:2.0.1' implementation 'com.scwang.smart:refresh-header-material:2.0.1' implementation 'com.scwang.smart:refresh-footer-ball:2.0.1' //球脉冲加载 implementation 'com.scwang.smart:refresh-footer-classics:2.0.1' //经典加载 implementation 'com.alibaba:fastjson:1.2.61' //更新版本 implementation 'com.github.jenly1314.AppUpdater:app-updater:1.1.0' implementation 'com.github.jenly1314.AppUpdater:app-dialog:1.1.0' //轮播插件 // implementation 'com.github.zhpanvip:BannerViewPager:3.5.4' //选择器 // implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:3.1.1' implementation 'com.github.gzu-liyujiang.AndroidPicker:AddressPicker:3.1.1' //EventBus implementation 'org.greenrobot:eventbus:3.1.1' implementation 'org.bouncycastle:bcprov-jdk15on:1.64' //工具类 implementation 'cn.hutool:hutool-all:5.7.11' //UI库 //友盟 // 下面各SDK根据宿主App是否使用相关业务按需引入。 // 友盟统计SDK implementation 'com.umeng.umsdk:common:9.4.2'// 必选 implementation 'com.umeng.umsdk:asms:1.4.1'// 必选 implementation 'com.umeng.umsdk:apm:1.4.2' // 错误分析升级为独立SDK,看crash数据请一定集成,可选 // implementation 'com.umeng.umsdk:abtest:1.0.0'//使用U-App中ABTest能力,可选 //xui implementation 'com.github.xuexiangjys:XUI:1.1.8' implementation 'com.github.getActivity:XToast:8.2' implementation 'com.github.tbruyelle:rxpermissions:0.12' implementation project(path: ':mylibrary') implementation project(':keybordlib') }