Commit 6af1d5a6 authored by shiyl's avatar shiyl

Merge branch 'feature/dev_order' of...

Merge branch 'feature/dev_order' of https://git.yidian-inc.com:8021/bp/ShenghuoquanBusiness into feature/dev_order
parents 2a351bec 68f5d8a7
...@@ -63,13 +63,11 @@ dependencies { ...@@ -63,13 +63,11 @@ dependencies {
kapt "com.android.databinding:compiler:4.0.1" kapt "com.android.databinding:compiler:4.0.1"
kapt 'com.github.bumptech.glide:compiler:4.12.0' kapt 'com.github.bumptech.glide:compiler:4.12.0'
api rootProject.ext.dependencies.publicImplementation api rootProject.ext.dependencies.publicImplementation
implementation rootProject.ext.dependencies.privateImplementation compileOnly rootProject.ext.dependencies.privateImplementation
testImplementation rootProject.ext.dependencies.testImplementation testImplementation rootProject.ext.dependencies.testImplementation
androidTestImplementation rootProject.ext.dependencies.androidTestImplementation androidTestImplementation rootProject.ext.dependencies.androidTestImplementation
api deps.yac.core api deps.yac.core
api deps.xarc.xbrid api deps.xarc.xbrid
api "com.yidian.xarc:xevent:0.0.3"
api "com.yidian.xpage:xpagenative:0.0.1"
api('com.yidian.android:CommonComponent:0.0.88') { api('com.yidian.android:CommonComponent:0.0.88') {
exclude(group: 'com.yidian.android', module: 'NetworkImageLib') exclude(group: 'com.yidian.android', module: 'NetworkImageLib')
} }
......
...@@ -11,7 +11,8 @@ object JudgeClientUtils { ...@@ -11,7 +11,8 @@ object JudgeClientUtils {
*/ */
fun judgeClient(packageName: String): ClientType { fun judgeClient(packageName: String): ClientType {
return when (packageName) { return when (packageName) {
"com.cutt.zhiyue.android" -> ClientType.MERCHANT_C "com.cutt.zhiyue.android",
"com.shenghuoquan" -> ClientType.MERCHANT_C
"com.shenghuoquan.business.debug", "com.shenghuoquan.business.debug",
"com.shenghuoquan.business" -> ClientType.MERCHANT_B "com.shenghuoquan.business" -> ClientType.MERCHANT_B
else -> { else -> {
......
...@@ -63,7 +63,7 @@ dependencies { ...@@ -63,7 +63,7 @@ dependencies {
rootProject.ext.dependencies.other.each { rootProject.ext.dependencies.other.each {
implementation project(it) implementation project(it)
} }
implementation rootProject.ext.dependencies.privateImplementation compileOnly rootProject.ext.dependencies.privateImplementation
testImplementation rootProject.ext.dependencies.testImplementation testImplementation rootProject.ext.dependencies.testImplementation
androidTestImplementation rootProject.ext.dependencies.androidTestImplementation androidTestImplementation rootProject.ext.dependencies.androidTestImplementation
} }
\ No newline at end of file
package com.yidian.shenghuoquan.bgeneralbusiness.app
import com.scwang.smart.refresh.footer.ClassicsFooter
import com.scwang.smart.refresh.header.ClassicsHeader
import com.scwang.smart.refresh.layout.SmartRefreshLayout
import com.scwang.smart.refresh.layout.constant.SpinnerStyle
import com.yidian.bcommon.services.ZapServiceNameConstants
import com.yidian.shenghuoquan.bgeneralbusiness.service.EncryptService
import com.yidian.shenghuoquan.bgeneralbusiness.service.GeneralAbilityService
import com.yidian.shenghuoquan.bgeneralbusiness.service.net.BNAHttpReqService
import com.yidian.yac.core.zap.Zap
/**
* author: yinjiacheng
* date: 8/4/21 4:58 PM
* description: 非组件化方案 替代Application
*/
object BGeneralBusiness {
/**
* 作用同application onCreate
*/
fun init() {
initService()
initSmartRefreshLayout()
}
private fun initService() {
Zap.addService(ZapServiceNameConstants.BNAHttpReq, BNAHttpReqService())
Zap.addService(ZapServiceNameConstants.GeneralAbilityService, GeneralAbilityService())
Zap.addService(ZapServiceNameConstants.EncryptService, EncryptService())
}
/**
* 设置刷新 默认的header和footer
*/
private fun initSmartRefreshLayout() {
//设置全局的Header构建器
SmartRefreshLayout.setDefaultRefreshHeaderCreator { context, layout ->
layout.setPrimaryColorsId(android.R.color.transparent)//全局设置主题颜色
ClassicsHeader(context) //指定为经典Header,默认是 贝塞尔雷达Header
}
//设置全局的Footer构建器
SmartRefreshLayout.setDefaultRefreshFooterCreator { context, layout ->
layout.setEnableLoadMoreWhenContentNotFull(true) //内容不满一页时候启用加载更多
val footer = ClassicsFooter(context)
footer.setBackgroundResource(android.R.color.transparent)
footer.setDrawableSize(20f)
footer.spinnerStyle = SpinnerStyle.FixedBehind //设置为固定在背后模式
footer //指定为经典Footer,默认是 BallPulseFooter
}
}
}
package com.yidian.shenghuoquan.bgeneralbusiness.app package com.yidian.shenghuoquan.bgeneralbusiness.app
import com.scwang.smart.refresh.footer.ClassicsFooter
import com.scwang.smart.refresh.header.ClassicsHeader
import com.scwang.smart.refresh.layout.SmartRefreshLayout
import com.scwang.smart.refresh.layout.constant.SpinnerStyle
import com.yidian.bcommon.app.YdBaseApplication import com.yidian.bcommon.app.YdBaseApplication
import com.yidian.bcommon.services.ZapServiceNameConstants import com.yidian.bcommon.services.ZapServiceNameConstants
import com.yidian.news.util.ProcessUtil import com.yidian.news.util.ProcessUtil
...@@ -16,6 +20,7 @@ class BGeneralBusinessApplication : YdBaseApplication() { ...@@ -16,6 +20,7 @@ class BGeneralBusinessApplication : YdBaseApplication() {
super.onCreate() super.onCreate()
if (ProcessUtil.isMainProcess(this)) { if (ProcessUtil.isMainProcess(this)) {
initService() initService()
initSmartRefreshLayout()
} }
} }
...@@ -25,4 +30,24 @@ class BGeneralBusinessApplication : YdBaseApplication() { ...@@ -25,4 +30,24 @@ class BGeneralBusinessApplication : YdBaseApplication() {
Zap.addService(ZapServiceNameConstants.EncryptService, EncryptService()) Zap.addService(ZapServiceNameConstants.EncryptService, EncryptService())
} }
/**
* 设置刷新 默认的header和footer
*/
private fun initSmartRefreshLayout() {
//设置全局的Header构建器
SmartRefreshLayout.setDefaultRefreshHeaderCreator { context, layout ->
layout.setPrimaryColorsId(android.R.color.transparent)//全局设置主题颜色
ClassicsHeader(context) //指定为经典Header,默认是 贝塞尔雷达Header
}
//设置全局的Footer构建器
SmartRefreshLayout.setDefaultRefreshFooterCreator { context, layout ->
layout.setEnableLoadMoreWhenContentNotFull(true) //内容不满一页时候启用加载更多
val footer = ClassicsFooter(context)
footer.setBackgroundResource(android.R.color.transparent)
footer.setDrawableSize(20f)
footer.spinnerStyle = SpinnerStyle.FixedBehind //设置为固定在背后模式
footer //指定为经典Footer,默认是 BallPulseFooter
}
}
} }
...@@ -63,7 +63,6 @@ android { ...@@ -63,7 +63,6 @@ android {
repositories { repositories {
flatDir { flatDir {
dirs 'libs' dirs 'libs'
dirs '../../CommonLib/Common/libs'
} }
} }
} }
...@@ -74,7 +73,7 @@ dependencies { ...@@ -74,7 +73,7 @@ dependencies {
rootProject.ext.dependencies.other.each { rootProject.ext.dependencies.other.each {
implementation project(it) implementation project(it)
} }
implementation rootProject.ext.dependencies.privateImplementation compileOnly rootProject.ext.dependencies.privateImplementation
testImplementation rootProject.ext.dependencies.testImplementation testImplementation rootProject.ext.dependencies.testImplementation
androidTestImplementation rootProject.ext.dependencies.androidTestImplementation androidTestImplementation rootProject.ext.dependencies.androidTestImplementation
} }
\ No newline at end of file
package com.yidian.shenghuoquan.broot package com.yidian.shenghuoquan.broot
import android.content.Context import android.content.Context
import com.scwang.smart.refresh.footer.ClassicsFooter
import com.scwang.smart.refresh.header.ClassicsHeader
import com.scwang.smart.refresh.layout.SmartRefreshLayout
import com.scwang.smart.refresh.layout.constant.SpinnerStyle
import com.yidian.bcommon.BuildConfig import com.yidian.bcommon.BuildConfig
import com.yidian.bcommon.constant.AppConfig import com.yidian.bcommon.constant.AppConfig
import com.yidian.bcommon.constant.GlobalConstants import com.yidian.bcommon.constant.GlobalConstants
...@@ -45,8 +41,6 @@ object BaseInitConfig { ...@@ -45,8 +41,6 @@ object BaseInitConfig {
initXBridManager(context) initXBridManager(context)
// 初始化App升级 // 初始化App升级
initAppUpgrade(context) initAppUpgrade(context)
// SmartRefresh
initSmartRefreshLayout()
// 调用延迟初始化 // 调用延迟初始化
ZapTicket(ZapServiceNameConstants.GeneralAbilityService).withAction(ZapServiceActionConstants.ActionLazyInit).ship() ZapTicket(ZapServiceNameConstants.GeneralAbilityService).withAction(ZapServiceActionConstants.ActionLazyInit).ship()
} }
...@@ -136,24 +130,4 @@ object BaseInitConfig { ...@@ -136,24 +130,4 @@ object BaseInitConfig {
}) })
} }
/**
* 设置刷新 默认的header和footer
*/
private fun initSmartRefreshLayout() {
//设置全局的Header构建器
SmartRefreshLayout.setDefaultRefreshHeaderCreator { context, layout ->
layout.setPrimaryColorsId(android.R.color.transparent)//全局设置主题颜色
ClassicsHeader(context) //指定为经典Header,默认是 贝塞尔雷达Header
}
//设置全局的Footer构建器
SmartRefreshLayout.setDefaultRefreshFooterCreator { context, layout ->
layout.setEnableLoadMoreWhenContentNotFull(true) //内容不满一页时候启用加载更多
val footer = ClassicsFooter(context)
footer.setBackgroundResource(android.R.color.transparent)
footer.setDrawableSize(20f)
footer.spinnerStyle = SpinnerStyle.FixedBehind //设置为固定在背后模式
footer //指定为经典Footer,默认是 BallPulseFooter
}
}
} }
...@@ -114,8 +114,6 @@ android { ...@@ -114,8 +114,6 @@ android {
repositories { repositories {
flatDir { flatDir {
dirs 'libs' dirs 'libs'
dirs '../Components/newscontent/libs'
dirs '../CommonLib/Common/libs'
} }
} }
} }
......
...@@ -25,6 +25,7 @@ ext { ...@@ -25,6 +25,7 @@ ext {
} }
ext.dependencies = [ ext.dependencies = [
// 公共依赖 目前全部依托BCommon组件做依赖传递 业务组件不需要直接引用
publicImplementation : [ publicImplementation : [
'androidx.core:core-ktx:$kotlin_version', 'androidx.core:core-ktx:$kotlin_version',
'androidx.appcompat:appcompat:1.2.0', 'androidx.appcompat:appcompat:1.2.0',
...@@ -34,15 +35,9 @@ ext.dependencies = [ ...@@ -34,15 +35,9 @@ ext.dependencies = [
'androidx.lifecycle:lifecycle-livedata-ktx:2.3.0', 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.0',
'androidx.lifecycle:lifecycle-extensions:2.2.0', 'androidx.lifecycle:lifecycle-extensions:2.2.0',
'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0', 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0',
// 日志 https://github.com/JakeWharton/timber
'com.jakewharton.timber:timber:4.7.1',
// 刷新
'com.scwang.smart:refresh-layout-kernel:2.0.1',
'com.scwang.smart:refresh-header-classics:2.0.1',
'com.scwang.smart:refresh-footer-classics:2.0.1',
"androidx.recyclerview:recyclerview:1.1.0", "androidx.recyclerview:recyclerview:1.1.0",
// 一点内部SDK
'com.yidian.android:CommonUtil:0.0.88', 'com.yidian.android:CommonUtil:0.0.88',
'com.yidian.android:nightmode:0.0.88', 'com.yidian.android:nightmode:0.0.88',
'com.yidian.xarc:xevent:0.0.3', 'com.yidian.xarc:xevent:0.0.3',
...@@ -51,7 +46,39 @@ ext.dependencies = [ ...@@ -51,7 +46,39 @@ ext.dependencies = [
// 应用升级SDK // 应用升级SDK
'com.yidian.pmcomponents:appupdate:0.0.8', 'com.yidian.pmcomponents:appupdate:0.0.8',
'com.yidian.xpage:xpagenative:0.0.1', 'com.yidian.xpage:xpagenative:0.0.1',
'com.yidian.framework.mobile:ydhttp:1.1.3-SNAPSHOT',
'com.yidian.framework.mobile:ydutils:1.0.1-SNAPSHOT',
// 磐石
'com.yidian.framework.mobile:xdiamond:1.0.8',
// 慧眼
'com.yidian.framework.mobile.xinsight:xinsight:1.1.7',
// 第三方SDK
// 屏幕适配 https://github.com/JessYanCoding/AndroidAutoSize
'me.jessyan:autosize:1.2.1',
// RecyclerView Adapter https://github.com/CymChad/BaseRecyclerViewAdapterHelper
'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4',
// 图片选择 https://github.com/LuckSiege/PictureSelector
'io.github.lucksiege:pictureselector:v2.7.3-rc05',
// 图片压缩 https://github.com/zetbaitsu/Compressor
'id.zelory:compressor:3.0.1',
// Glide https://github.com/bumptech/glide
'com.github.bumptech.glide:glide:4.12.0',
// 日志 https://github.com/JakeWharton/timber
'com.jakewharton.timber:timber:4.7.1',
// 刷新 https://github.com/scwang90/SmartRefreshLayout
'com.scwang.smart:refresh-layout-kernel:2.0.1',
'com.scwang.smart:refresh-header-classics:2.0.1',
'com.scwang.smart:refresh-footer-classics:2.0.1',
// 权限 https://github.com/tbruyelle/RxPermissions
'com.github.tbruyelle:rxpermissions:0.12',
// RxAndroid https://github.com/ReactiveX/RxAndroid
'io.reactivex.rxjava3:rxandroid:3.0.0',
// RxJava https://github.com/ReactiveX/RxJava
'io.reactivex.rxjava3:rxjava:3.0.9',
],
// 私有依赖 B端自己使用的依赖(不输出给C端)只在B端使用的组件以implementation依赖 需要输出给C端的组件以compileOnly依赖
privateImplementation : [
// 友盟基础组件(必选) // 友盟基础组件(必选)
'com.umeng.umsdk:common:9.4.0', 'com.umeng.umsdk:common:9.4.0',
'com.umeng.umsdk:asms:1.4.0', 'com.umeng.umsdk:asms:1.4.0',
...@@ -64,7 +91,6 @@ ext.dependencies = [ ...@@ -64,7 +91,6 @@ ext.dependencies = [
// 友盟分享模块 // 友盟分享模块
'com.umeng.umsdk:share-qq:7.1.4', 'com.umeng.umsdk:share-qq:7.1.4',
'com.umeng.umsdk:share-wx:7.1.4', 'com.umeng.umsdk:share-wx:7.1.4',
'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.6.5',
'com.umeng.umsdk:share-sina:7.1.4', 'com.umeng.umsdk:share-sina:7.1.4',
// PushSDK核心库 // PushSDK核心库
'com.umeng.umsdk:push:6.3.3', 'com.umeng.umsdk:push:6.3.3',
...@@ -82,29 +108,6 @@ ext.dependencies = [ ...@@ -82,29 +108,6 @@ ext.dependencies = [
'com.umeng.umsdk:agoo_tlog:3.0.0.17', 'com.umeng.umsdk:agoo_tlog:3.0.0.17',
// 消息推送网络核心库,必须添加 // 消息推送网络核心库,必须添加
'com.umeng.umsdk:agoo_tnet4android:3.1.14.10', 'com.umeng.umsdk:agoo_tnet4android:3.1.14.10',
'com.github.tbruyelle:rxpermissions:0.12',
'io.reactivex.rxjava3:rxandroid:3.0.0',
'io.reactivex.rxjava3:rxjava:3.0.9',
'com.yidian.framework.mobile:ydhttp:1.1.3-SNAPSHOT',
'com.yidian.framework.mobile:ydutils:1.0.1-SNAPSHOT',
// 磐石
'com.yidian.framework.mobile:xdiamond:1.0.8',
// 慧眼
'com.yidian.framework.mobile.xinsight:xinsight:1.1.7',
// 屏幕适配
'me.jessyan:autosize:1.2.1',
//https://github.com/CymChad/BaseRecyclerViewAdapterHelper
'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4',
// PictureSelector2.0 https://github.com/LuckSiege/PictureSelector
'io.github.lucksiege:pictureselector:v2.7.3-rc05',
// Compressor https://github.com/zetbaitsu/Compressor
'id.zelory:compressor:3.0.1',
// Glide https://github.com/bumptech/glide
'com.github.bumptech.glide:glide:4.12.0',
],
// 私有依赖
privateImplementation : [
// (Ping++ 标准版 SDK) 必须添加 // (Ping++ 标准版 SDK) 必须添加
'com.pingxx:pingpp-android:2.3.5', 'com.pingxx:pingpp-android:2.3.5',
// 使用微信支付时添加,具体版本参考微信官方文档 // 使用微信支付时添加,具体版本参考微信官方文档
......
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