Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
ShenghuoquanBusiness
Commits
efd2617f
Commit
efd2617f
authored
Jun 17, 2021
by
shiyuelong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 将公共参数的配置信息统一放gradle中配置
parent
886a400b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
36 deletions
+49
-36
build.gradle
CommonLib/Common/build.gradle
+12
-10
AppConfig.kt
...onLib/Common/src/main/java/com/yidian/common/AppConfig.kt
+14
-5
build.gradle
app/build.gradle
+1
-1
config.gradle
config/config.gradle
+22
-20
No files found.
CommonLib/Common/build.gradle
View file @
efd2617f
...
...
@@ -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
{
...
...
CommonLib/Common/src/main/java/com/yidian/common/AppConfig.kt
View file @
efd2617f
...
...
@@ -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"
...
...
app/build.gradle
View file @
efd2617f
...
...
@@ -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"
}
}
}
...
...
config/config.gradle
View file @
efd2617f
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'
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment