Skip to content

Commit

Permalink
架构调整
Browse files Browse the repository at this point in the history
  • Loading branch information
K0170016 authored and K0170016 committed Aug 14, 2019
1 parent 48319d8 commit bcfe664
Show file tree
Hide file tree
Showing 55 changed files with 12 additions and 534 deletions.
4 changes: 2 additions & 2 deletions core-arch/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ artifacts {
dependencies {
//Application代理注解
api project(':core-arch-annotations')
//版本兼容包
//X_APPCOMPAT
api "androidx.appcompat:appcompat:${X_APPCOMPAT}"
//Arch
//X_LIFECYCLE
api "androidx.lifecycle:lifecycle-extensions:${X_LIFECYCLE}"
//RxJava
api "io.reactivex.rxjava2:rxjava:${RX_JAVA_2}"
Expand Down
12 changes: 7 additions & 5 deletions core-base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,22 @@ repositories {
}

dependencies {
//引入jar包
api fileTree(include: ['*.jar'], dir: 'libs')
//引入资源库
api project(':core-res')
//内核
api project(':core-arch')
//工具
api "com.github.coolfire2015:RxFluxUtils:${RX_FLUX_UTILS}"
//图片解析
api "com.github.coolfire2015:RxFluxImage:${RX_FLUX_IMAGE}"
//X-Core
api "androidx.core:core:${X_CORE}"
api "androidx.core:core-ktx:${X_CORE}"
//X_APPCOMPAT
api "androidx.appcompat:appcompat:${X_APPCOMPAT}"
//X-Fragment
api "androidx.fragment:fragment:${X_FRAGMENT}"
api "androidx.fragment:fragment-ktx:${X_FRAGMENT}"
//X-Lifecycle
api "androidx.lifecycle:lifecycle-extensions:${X_LIFECYCLE}"
api "androidx.lifecycle:lifecycle-livedata-ktx:${X_LIFECYCLE}"
api "androidx.lifecycle:lifecycle-viewmodel-ktx:${X_LIFECYCLE}"
//X-Navigation
Expand Down Expand Up @@ -130,8 +131,9 @@ dependencies {
api "com.squareup.retrofit2:converter-gson:${RETROFIT}"
api "com.squareup.retrofit2:converter-scalars:${RETROFIT}"
api "com.squareup.retrofit2:adapter-rxjava2:${RETROFIT}"
//Json
//Json解析
api "com.google.code.gson:gson:${GSON}"
api "com.alibaba:fastjson:${FAST_JSON}"
//路由器ARouter
api "com.alibaba:arouter-api:${AROUTER_API}"
//RxJava 生命周期绑定 AutoDispose
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import com.huyingbao.core.base.R
import com.huyingbao.core.common.action.CommonActionCreator
import com.huyingbao.core.common.dialog.CommonLoadingDialog
import com.huyingbao.core.common.dialog.CommonLoadingDialogClickListener
import com.huyingbao.core.common.model.CommonException
import com.huyingbao.core.utils.LocalStorageUtils
import org.greenrobot.eventbus.Subscribe
import org.jetbrains.anko.toast
import retrofit2.HttpException
import java.net.SocketException
import java.net.SocketTimeoutException
import java.net.UnknownHostException
Expand Down Expand Up @@ -78,8 +78,7 @@ abstract class BaseFluxActivity<T : RxActivityStore> :
@Subscribe(sticky = true)
open fun onRxError(rxError: RxError) {
when (val throwable = rxError.throwable) {
is CommonException -> this.toast(rxError.throwable.message ?: "未知异常")
is retrofit2.HttpException -> this.toast(throwable.code().toString() + ":服务器问题")
is HttpException -> this.toast("${throwable.code()}:${throwable.message()}")
is SocketException -> this.toast("网络异常!")
is UnknownHostException -> this.toast("网络异常!")
is SocketTimeoutException -> this.toast("连接超时!")
Expand Down

This file was deleted.

47 changes: 0 additions & 47 deletions core-base/src/main/java/com/huyingbao/core/utils/AndroidUtils.kt

This file was deleted.

61 changes: 0 additions & 61 deletions core-base/src/main/java/com/huyingbao/core/utils/FlatMapUtils.kt

This file was deleted.

87 changes: 0 additions & 87 deletions core-base/src/main/java/com/huyingbao/core/utils/GsonUtils.kt

This file was deleted.

This file was deleted.

Loading

0 comments on commit bcfe664

Please sign in to comment.