plugins { id 'com.android.application' id 'kotlin-android' id 'kotlin-kapt' id 'com.huawei.agconnect' id 'kotlin-android-extensions' } android { compileSdkVersion 30 buildToolsVersion "30.0.3" signingConfigs { config { keyAlias 'key0' keyPassword '123456' storeFile file('key.jks') storePassword '123456' v1SigningEnabled true v2SigningEnabled true } // debug { // keyAlias 'key0' // keyPassword '123456' // storeFile file('key.jks') // storePassword '123456' // } // release { // keyAlias 'key0' // keyPassword '123456' // storeFile file('key.jks') // storePassword '123456' // } } defaultConfig { applicationId "com.arpa.hndahesudintocctmsdriver" minSdkVersion 24 targetSdkVersion 30 versionCode 76 versionName "3.4.6" flavorDimensions "CHANNEL_VALUE" flavorDimensions "app_icon" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true arguments = [moduleName: project.getName()] } } ndk { //选择要添加的对应 cpu 类型的 .so 库。 abiFilters 'armeabi-v7a', 'arm64-v8a' // 还可以添加 'x86', 'x86_64', 'mips', 'mips64' , 'arm64-v8a' } } sourceSets { main { jniLibs.srcDirs = ['libs'] } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.config } debug { signingConfig signingConfigs.config } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } allprojects { repositories { maven { url "https://jitpack.io" } } } repositories { flatDir { dirs 'libs' } } productFlavors { qa { applicationId "com.arpa.hndahesudintocctmsdriver.text" manifestPlaceholders = [CHANNEL_VALUE: "司机测试", app_icon : "@drawable/diver_logo_text", GAODEKEY : "6791d69f6221a0841b521763af86eb01", JPUSH_PKGNAME: applicationId, JPUSH_APPKEY : "fba6f55621c670d8c1fe9191", //JPush 上注册的包名对应的 Appkey. JPUSH_CHANNEL: "developer-default"//暂时填写默认值即可. ] buildConfigField("String", "OPEN_AL_URL", "\"https://oapi-staging.alct56.com\"") buildConfigField("String", "BASE_URL", "\"http://192.168.1.118:8080/api/\"") // buildConfigField("String", "BASE_URL", "\"http://linux.local:8080/api/\"") buildConfigField "boolean", "isTest", "true" //APP名称,可以在androidMainfest中引用 resValue "string", "appName", "司机测试" } product { applicationId "com.arpa.hndahesudintocctmsdriver" manifestPlaceholders = [CHANNEL_VALUE: "大河好运司机", app_icon : "@drawable/diver_logo", GAODEKEY : "9480fd96746922630e9bf6c75a101059", JPUSH_PKGNAME: applicationId, JPUSH_APPKEY : "fba6f55621c670d8c1fe9191", //JPush 上注册的包名对应的 Appkey. JPUSH_CHANNEL: "developer-default"//暂时填写默认值即可. ] buildConfigField("String", "OPEN_AL_URL", "\"https://oapi.alct56.com\"") buildConfigField("String", "BASE_URL", "\"http://app.dahehuoyun.com/api/\"") buildConfigField "boolean", "isTest", "false" //APP名称,可以在androidMainfest中引用 resValue "string", "appName", "大河好运司机" } } // productFlavors.all { flavor -> // flavor.manifestPlaceholders = [CHANNEL_VALUE: name] // } android.applicationVariants.all { variant -> variant.outputs.all { def date = new Date().format("MMdd_HH-mm", TimeZone.getTimeZone("GMT+08")) def isText = variant.productFlavors[0].properties.get("buildConfigFields").getAt("isTest").properties.get("value") def appName = null if (isText == "true") { appName = '大河好运司机测试_' } else { appName = '大河好运司机_' } outputFileName = appName + "${variant.buildType.name}_${defaultConfig.versionName}_${date}.apk" } } lintOptions { abortOnError false } dexOptions { preDexLibraries false } } dependencies { implementation 'com.google.android.material:material:1.2.1' implementation 'androidx.constraintlayout:constraintlayout:2.0.1' implementation 'com.caverock:androidsvg-aar:1.3' //当引入的与之前引入的库有重复冲突部分的时候,使用compileOnly implementation files('libs\\mdp_sdk.jar') //压缩工具 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.github.jenly1314.AppUpdater:app-updater:1.2.0' implementation 'com.github.jenly1314.AppUpdater:app-dialog:1.2.0' //轮播插件 implementation 'com.github.zhpanvip:BannerViewPager:3.5.4' // // implementation 'com.lxj:xpopup:2.2.8' //工具类 //implementation 'cn.hutool:hutool-all:5.7.11' //交通厅 implementation 'com.lzy.net:okgo:3.0.4' implementation 'com.alibaba:fastjson:1.2.61' implementation 'org.bouncycastle:bcprov-jdk15on:1.55' implementation 'org.apache.commons:commons-lang3:3.5' implementation(name: 'locationgd-androidx_2.1.0', ext: 'aar')//交通厅 //安联 // implementation 'com.google.code.gson:gson:2.8.6' implementation 'com.loopj.android:android-async-http:1.4.9' implementation 'com.j256.ormlite:ormlite-android:4.48' implementation 'com.j256.ormlite:ormlite-core:4.48' compileOnly 'com.github.hotchemi:permissionsdispatcher:2.3.1' annotationProcessor 'com.github.hotchemi:permissionsdispatcher-processor:2.3.1' //极光认证 implementation 'cn.jiguang.sdk:jverification:2.7.1' // 此处以2.7.1 版本为例。a implementation 'cn.jiguang.sdk:jpush:4.2.4' // 此处以JPush 4.2.4 版本为例。 implementation 'cn.jiguang.sdk:jcore:2.9.0' // 此处以JCore 2.9.0 版本为例。 //友盟 // 下面各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能力,可选 //动态权限获取 implementation "org.permissionsdispatcher:permissionsdispatcher:4.6.0" kapt "org.permissionsdispatcher:permissionsdispatcher-processor:4.6.0" //选择器 implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:3.1.1' //EventBus implementation 'org.greenrobot:eventbus:3.1.1' //易签宝 implementation(name: 'EsignSDK', ext: 'aar') implementation 'pub.devrel:easypermissions:1.3.0' implementation "com.squareup.retrofit2:retrofit:2.4.0" // implementation "com.squareup.retrofit2:converter-gson:2.4.0" implementation "com.squareup.retrofit2:adapter-rxjava2:2.4.0" // implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0' implementation "io.reactivex.rxjava2:rxjava:2.1.5" implementation "io.reactivex.rxjava2:rxandroid:2.0.1" //pdf展示 implementation 'com.github.barteksc:android-pdf-viewer:3.2.0-beta.1' // implementation 'com.github.getActivity:XToast:8.2' implementation project(path: ':mylibrary') }