Commit efd2617f authored by shiyuelong's avatar shiyuelong

add 将公共参数的配置信息统一放gradle中配置

parent 886a400b
......@@ -6,19 +6,21 @@ plugins {
}
android {
compileSdkVersion 30
compileSdkVersion build_versions.compileSdkVersion
buildToolsVersion "30.0.2"
publishNonDefault true
defaultConfig {
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
minSdkVersion build_versions.minSdkVersion
targetSdkVersion build_versions.targetSdkVersion
versionCode rootProject.ext.android.versionCode
versionName rootProject.ext.android.versionName
buildConfigField("String", "SERVICE_VERSION", rootProject.ext.android.serviceVersion)
buildConfigField("boolean", "IS_ENCRYPT", rootProject.ext.android.isEncrypt)
javaCompileOptions {
annotationProcessorOptions {
arguments = [ setAttributeClassName : 'YdSubwaySetAttributeMethodProvider',
bindingDataClassName : 'YdSubwayBindingDataMethodProvider']
arguments = [setAttributeClassName: 'YdSubwaySetAttributeMethodProvider',
bindingDataClassName : 'YdSubwayBindingDataMethodProvider']
}
}
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
......@@ -41,13 +43,13 @@ android {
kotlinOptions {
jvmTarget = '1.8'
}
androidExtensions{
androidExtensions {
experimental = true
}
viewBinding{
viewBinding {
enabled = true
}
kapt{
kapt {
generateStubs = true
}
repositories {
......
......@@ -2,16 +2,24 @@ package com.yidian.common
class AppConfig {
companion object {
//生活圈项目
const val IS_ENCRYPT = false
// 是否开启加密
const val IS_ENCRYPT = BuildConfig.IS_ENCRYPT
const val KUANGSHI_ALIVE_API_KEY = "32f9XIsReV4S15Ck_Sa3ky43XgAHUB9v"
const val KUANGSHI_SECRET = "usZbQYdI4PQeXhMftsRfHK2msj0DmSIl"
// 渠道
const val appid = "merchant-b"
const val cv = "1.0.0"
const val version = "000100"
// 客户端版本号
const val cv = BuildConfig.VERSION_NAME
// 服务端版本号
const val version = BuildConfig.SERVICE_VERSION
// 分发
const val distribution = "official"
// 平台
const val platform = "1"
......@@ -33,6 +41,7 @@ class AppConfig {
const val UMTestChannel = "ANDROID_CHANNEL"
const val UMTestType = "metro"
const val UMTestSecret = "e78446e86d153e2891ae7523e1532f13"
// 友盟线上环境配置
const val UMAppKey = "60c8479fe044530ff0a49936"//umeng统计key注释
const val UMChannel = "ANDROID_CHANNEL"
......
......@@ -65,7 +65,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
applicationVariants.all { variant ->
variant.outputs.all { output ->
outputFileName = "business-${variant.name}-${defaultConfig.versionName}-${defaultConfig.versionCode}.apk"
outputFileName = "merchant-b-${variant.name}-${defaultConfig.versionName}-${defaultConfig.versionCode}.apk"
}
}
}
......
ext {
android = [
applicationId : "com.shenghuoquan.business",
versionCode : 100,
versionName : "1.0.0",
isApplication : false
]
buildParams = [
debug : [
API_URL: '"http://bp-dev.go2yd.com"',
],
release: [
API_URL: '"http://bp-dev.go2yd.com"',
]
]
android = [
applicationId : "com.shenghuoquan.business",
versionCode : 100,
versionName : "1.0.0",
serviceVersion: '"000100"',// 上线前需要和服务端确认并更新
isEncrypt : 'true',// 上线前需要开启加密
isApplication : false
]
buildParams = [
debug : [
// API_URL: '"http://bp-dev.go2yd.com"',
API_URL: '"http://bp-test.go2yd.com"',
],
release: [
API_URL: '"http://bp-dev.go2yd.com"',
]
]
}
ext.dependencies = [
publicImplementation :[
publicImplementation : [
'androidx.core:core-ktx:$kotlin_version',
'androidx.appcompat:appcompat:1.2.0',
'com.google.android.material:material:1.2.1',
......@@ -81,15 +83,15 @@ ext.dependencies = [
'com.loopj.android:android-async-http:1.4.9'
],
other:[
other : [
':CommonLib:Common'
],
video:'com.yidian.framework.mobile:ydvideo:1.0.0-SNAPSHOT',
androidTestImplementation:[
video : 'com.yidian.framework.mobile:ydvideo:1.0.0-SNAPSHOT',
androidTestImplementation: [
'androidx.test.ext:junit:1.1.2',
'androidx.test.espresso:espresso-core:3.3.0'
],
testImplementation : 'junit:junit:4.13.1'
testImplementation : 'junit:junit:4.13.1'
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment