diff --git a/lib_base/build.gradle b/lib_base/build.gradle
index 31a9d4c..1e5b37c 100644
--- a/lib_base/build.gradle
+++ b/lib_base/build.gradle
@@ -41,6 +41,10 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}
+ kotlinOptions {
+ jvmTarget = "1.8"
+ }
+
}
dependencies {
@@ -52,25 +56,26 @@ dependencies {
//AndroidSupport
api androidLibraries.supportV4
api androidLibraries.appcompat
- api androidLibraries.recyclerview
+ api androidLibraries.recyclerView
api androidLibraries.material
api androidLibraries.percentLayout
api androidLibraries.constraintLayout
api androidLibraries.annotation
//AAC
- api androidLibraries. archRuntime
- api androidLibraries. archCommon
- api androidLibraries. lifecycleCommon
- api androidLibraries. lifecycleCommonJava8
- api androidLibraries. lifecycleRuntimeKtx
- api androidLibraries. lifecycleLiveDataCore
- api androidLibraries. lifecycleLiveData
- api androidLibraries. lifecycleLiveKtx
- api androidLibraries. lifecycleViewModel
- api androidLibraries. lifecycleViewModelKtx
- api androidLibraries. lifecycleExtensions
- api androidLibraries. lifecycleReactiveStreams
+ api androidLibraries.archRuntime
+ api androidLibraries.archCommon
+ api androidLibraries.fragmentKtx
+ api androidLibraries.lifecycleCommon
+ api androidLibraries.lifecycleCommonJava8
+ api androidLibraries.lifecycleRuntimeKtx
+ api androidLibraries.lifecycleLiveDataCore
+ api androidLibraries.lifecycleLiveData
+ api androidLibraries.lifecycleLiveKtx
+ api androidLibraries.lifecycleViewModel
+ api androidLibraries.lifecycleViewModelKtx
+ api androidLibraries.lifecycleExtensions
+ api androidLibraries.lifecycleReactiveStreams
//Kotlin
api kotlinLibraries.kotlinStdlib
@@ -83,6 +88,8 @@ dependencies {
api thirdLibraries.rxAndroid
api thirdLibraries.rxBinding
api thirdLibraries.autoDispose
+ api thirdLibraries.autoDisposeAndroid
+ api thirdLibraries.autoDisposeLifecycle
api thirdLibraries.autoDisposeLifecycleArchcomponents
/*Dagger2*/
@@ -98,7 +105,6 @@ dependencies {
//Adapter
api uiLibraries.multiType
- api uiLibraries.multiTypeKotlin
//Log
api thirdLibraries.timber
diff --git a/lib_base/src/main/java/com/android/base/adapter/recycler/AdapterDataObserverProxy.java b/lib_base/src/main/java/com/android/base/adapter/recycler/AdapterDataObserverProxy.java
index bbdbf71..778f2b2 100644
--- a/lib_base/src/main/java/com/android/base/adapter/recycler/AdapterDataObserverProxy.java
+++ b/lib_base/src/main/java/com/android/base/adapter/recycler/AdapterDataObserverProxy.java
@@ -1,7 +1,8 @@
package com.android.base.adapter.recycler;
-import android.support.annotation.Nullable;
-import android.support.v7.widget.RecyclerView;
+
+import androidx.annotation.Nullable;
+import androidx.recyclerview.widget.RecyclerView;
/**
* @see PagingWithHeader
diff --git a/lib_base/src/main/java/com/android/base/adapter/recycler/DiffRecyclerAdapter.java b/lib_base/src/main/java/com/android/base/adapter/recycler/DiffRecyclerAdapter.java
index 5a29991..d79da4a 100644
--- a/lib_base/src/main/java/com/android/base/adapter/recycler/DiffRecyclerAdapter.java
+++ b/lib_base/src/main/java/com/android/base/adapter/recycler/DiffRecyclerAdapter.java
@@ -1,13 +1,6 @@
package com.android.base.adapter.recycler;
import android.content.Context;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.v7.recyclerview.extensions.AsyncDifferConfig;
-import android.support.v7.recyclerview.extensions.AsyncListDiffer;
-import android.support.v7.util.AdapterListUpdateCallback;
-import android.support.v7.util.DiffUtil;
-import android.support.v7.widget.RecyclerView;
import android.view.ViewGroup;
import com.android.base.adapter.DataManager;
@@ -17,6 +10,14 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Executor;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.recyclerview.widget.AdapterListUpdateCallback;
+import androidx.recyclerview.widget.AsyncDifferConfig;
+import androidx.recyclerview.widget.AsyncListDiffer;
+import androidx.recyclerview.widget.DiffUtil;
+import androidx.recyclerview.widget.RecyclerView;
+
/**
* RecyclerView 的适配器,注意: 只有{@link #setDataSource(List, boolean)}才能替换原有数据源的引用。
*
diff --git a/lib_base/src/main/java/com/android/base/adapter/recycler/ItemViewBinder.kt b/lib_base/src/main/java/com/android/base/adapter/recycler/ItemViewBinder.kt
index d67b5b1..67aca4b 100644
--- a/lib_base/src/main/java/com/android/base/adapter/recycler/ItemViewBinder.kt
+++ b/lib_base/src/main/java/com/android/base/adapter/recycler/ItemViewBinder.kt
@@ -1,9 +1,9 @@
package com.android.base.adapter.recycler
-import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import androidx.recyclerview.widget.RecyclerView
import com.android.base.kotlin.KtViewHolder
/**
@@ -11,7 +11,7 @@ import com.android.base.kotlin.KtViewHolder
* Email: 1169654504@qq.com
* Date : 2017-09-13 15:33
*/
-abstract class ItemViewBinder : me.drakeet.multitype.ItemViewBinder() {
+abstract class ItemViewBinder : com.drakeet.multitype.ItemViewBinder() {
protected val dataManager: MultiTypeAdapter
get() = adapter as MultiTypeAdapter
diff --git a/lib_base/src/main/java/com/android/base/adapter/recycler/MultiTypeAdapter.java b/lib_base/src/main/java/com/android/base/adapter/recycler/MultiTypeAdapter.java
index 0ee935b..2c4bf64 100644
--- a/lib_base/src/main/java/com/android/base/adapter/recycler/MultiTypeAdapter.java
+++ b/lib_base/src/main/java/com/android/base/adapter/recycler/MultiTypeAdapter.java
@@ -1,19 +1,19 @@
package com.android.base.adapter.recycler;
import android.content.Context;
-import android.support.annotation.NonNull;
import com.android.base.adapter.DataManager;
import java.util.ArrayList;
import java.util.List;
-import me.drakeet.multitype.TypePool;
+import androidx.annotation.NonNull;
+
/**
* @see drakeet/MultiTypeAdapter
*/
-public class MultiTypeAdapter extends me.drakeet.multitype.MultiTypeAdapter implements DataManager