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
77810005
Commit
77810005
authored
Aug 04, 2021
by
shiyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新版本号,修复网络请求初始化问题
parent
23e7eeac
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
77 deletions
+24
-77
build.gradle
Components/BGeneralBusiness/build.gradle
+0
-53
BGeneralBusinessApplication.kt
...oquan/bgeneralbusiness/app/BGeneralBusinessApplication.kt
+0
-22
LazyInitConfig.kt
...an/shenghuoquan/bgeneralbusiness/config/LazyInitConfig.kt
+19
-0
GeneralAbilityService.kt
...huoquan/bgeneralbusiness/service/GeneralAbilityService.kt
+2
-0
README.md
README.md
+1
-0
config.gradle
config/config.gradle
+2
-2
No files found.
Components/BGeneralBusiness/build.gradle
View file @
77810005
...
...
@@ -66,57 +66,4 @@ dependencies {
implementation
rootProject
.
ext
.
dependencies
.
privateImplementation
testImplementation
rootProject
.
ext
.
dependencies
.
testImplementation
androidTestImplementation
rootProject
.
ext
.
dependencies
.
androidTestImplementation
}
// 发布配置
apply
plugin:
'maven'
apply
plugin:
'signing'
ext
{
GROUP
=
'com.yidian.business'
ARTIFACTID
=
'generalbusiness'
VERSION_NAME
=
'0.0.1'
}
task
uploadMaven1
(
type:
Upload
)
{
configuration
=
configurations
.
archives
repositories
{
mavenDeployer
{
repository
(
url:
'http://dailybuild2.yidian-inc.com:8088/repository/maven-releases/'
)
{
authentication
(
userName:
"android"
,
password:
"Android2017"
)
}
snapshotRepository
(
url:
'http://dailybuild2.yidian-inc.com:8088/repository/maven-snapshots/'
)
{
authentication
(
userName:
"android"
,
password:
"Android2017"
)
}
pom
.
groupId
=
GROUP
pom
.
artifactId
=
ARTIFACTID
pom
.
version
=
VERSION_NAME
pom
.
whenConfigured
{
pom
->
pom
.
dependencies
.
each
{
dep
->
if
(
dep
.
getVersion
()
==
"unspecified"
)
{
dep
.
setGroupId
(
GROUP
)
dge
dep
.
setVersion
(
VERSION_NAME
)
}
}
}
println
(
"${project} : ${pom.version} package success"
)
}
}
}
task
uploadToLocal
(
type:
Upload
)
{
configuration
=
configurations
.
archives
repositories
{
mavenDeployer
{
repository
(
url:
uri
(
'../../repo'
))
pom
.
groupId
=
GROUP
pom
.
artifactId
=
ARTIFACTID
pom
.
version
=
VERSION_NAME
}
}
}
task
uploadToMaven
{
dependsOn
(
uploadMaven1
)
}
\ No newline at end of file
Components/BGeneralBusiness/src/main/java/com/yidian/shenghuoquan/bgeneralbusiness/app/BGeneralBusinessApplication.kt
View file @
77810005
package
com.yidian.shenghuoquan.bgeneralbusiness.app
import
com.yidian.bcommon.BuildConfig
import
com.yidian.bcommon.app.YdBaseApplication
import
com.yidian.bcommon.constant.RunConfig
import
com.yidian.bcommon.http.ApiSaveCookiesInterceptor
import
com.yidian.bcommon.http.ApiSetCookiesInterceptor
import
com.yidian.bcommon.sdk.ClientType
import
com.yidian.bcommon.sdk.JudgeClientUtils
import
com.yidian.bcommon.services.ZapServiceNameConstants
import
com.yidian.framework.mobile.xdiamond.SecretUtil
import
com.yidian.http.ServiceFactory
import
com.yidian.news.util.ProcessUtil
import
com.yidian.shenghuoquan.bgeneralbusiness.service.EncryptService
import
com.yidian.shenghuoquan.bgeneralbusiness.service.GeneralAbilityService
...
...
@@ -24,7 +16,6 @@ class BGeneralBusinessApplication : YdBaseApplication() {
super
.
onCreate
()
if
(
ProcessUtil
.
isMainProcess
(
this
))
{
initService
()
initHttp
()
}
}
...
...
@@ -34,17 +25,4 @@ class BGeneralBusinessApplication : YdBaseApplication() {
Zap
.
addService
(
ZapServiceNameConstants
.
EncryptService
,
EncryptService
())
}
/**
* 初始化Http框架
*/
private
fun
initHttp
()
{
ServiceFactory
.
getInstance
().
init
(
true
,
RunConfig
.
API_URL
,
10
,
10
)
if
(
JudgeClientUtils
.
judgeClient
(
packageName
)
==
ClientType
.
MERCHANT_B
)
{
// 添加cookie拦截器
ServiceFactory
.
getInstance
().
addInterceptor
(
ApiSaveCookiesInterceptor
())
ServiceFactory
.
getInstance
().
addInterceptor
(
ApiSetCookiesInterceptor
())
}
// 初始化磐石SDK
SecretUtil
.
init
(
RunConfig
.
IS_ENCRYPT_DEBUG_KEY
,
BuildConfig
.
DEBUG
)
}
}
Components/BGeneralBusiness/src/main/java/com/yidian/shenghuoquan/bgeneralbusiness/config/LazyInitConfig.kt
View file @
77810005
...
...
@@ -4,12 +4,17 @@ import com.yidian.bcommon.BuildConfig
import
com.yidian.bcommon.app.YdBaseApplication
import
com.yidian.bcommon.constant.AppConfig
import
com.yidian.bcommon.constant.RunConfig
import
com.yidian.bcommon.http.ApiSaveCookiesInterceptor
import
com.yidian.bcommon.http.ApiSetCookiesInterceptor
import
com.yidian.bcommon.sdk.BCommonManager
import
com.yidian.bcommon.sdk.ClientType
import
com.yidian.bcommon.sdk.JudgeClientUtils
import
com.yidian.framework.mobile.insight.config.ServerUrlConfig
import
com.yidian.framework.mobile.insight.config.XDiamondProvide
import
com.yidian.framework.mobile.insight.manage.XInsight
import
com.yidian.framework.mobile.insight.manage.XInsightConfig
import
com.yidian.framework.mobile.xdiamond.SecretUtil
import
com.yidian.http.ServiceFactory
import
com.yidian.yac.ftdevicefinger.core.FtDeviceFingerManager
/**
...
...
@@ -19,6 +24,20 @@ import com.yidian.yac.ftdevicefinger.core.FtDeviceFingerManager
*/
object
LazyInitConfig
{
/**
* 初始化Http框架
*/
fun
initHttp
()
{
ServiceFactory
.
getInstance
().
init
(
true
,
RunConfig
.
API_URL
,
10
,
10
)
if
(
JudgeClientUtils
.
judgeClient
(
YdBaseApplication
.
context
.
packageName
)
==
ClientType
.
MERCHANT_B
)
{
// 添加cookie拦截器
ServiceFactory
.
getInstance
().
addInterceptor
(
ApiSaveCookiesInterceptor
())
ServiceFactory
.
getInstance
().
addInterceptor
(
ApiSetCookiesInterceptor
())
}
// 初始化磐石SDK
SecretUtil
.
init
(
RunConfig
.
IS_ENCRYPT_DEBUG_KEY
,
BuildConfig
.
DEBUG
)
}
/**
* 初始化慧眼
*/
...
...
Components/BGeneralBusiness/src/main/java/com/yidian/shenghuoquan/bgeneralbusiness/service/GeneralAbilityService.kt
View file @
77810005
...
...
@@ -56,6 +56,8 @@ class GeneralAbilityService : ZapService() {
* 延迟初始化
*/
private
fun
lazyInit
()
{
// 初始化网络请求
LazyInitConfig
.
initHttp
()
// 初始化慧眼
LazyInitConfig
.
initXInsight
()
}
...
...
README.md
View file @
77810005
...
...
@@ -15,3 +15,4 @@
| 小米 | app.xiaomi.com |
| oppo | oppo.store |
| vivo | vivo |
发布时间:立即发布和定时发布2种,vivo、OPPO、华为可修改定时发布时间;应用宝、小米不能
\ No newline at end of file
config/config.gradle
View file @
77810005
...
...
@@ -2,8 +2,8 @@ ext {
android
=
[
applicationTestId:
"com.shenghuoquan.business.debug"
,
applicationId
:
"com.shenghuoquan.business"
,
versionCode
:
10
1
,
versionName
:
"1.0.
1
"
,
versionCode
:
10
2
,
versionName
:
"1.0.
2
"
,
isApplication
:
false
,
]
// 高德地图的key
...
...
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