From bd6fa569c2b8006154d439693d2f07d5ebc1eea3 Mon Sep 17 00:00:00 2001 From: Sunny Luo Date: Tue, 20 Sep 2022 11:53:55 +0800 Subject: [PATCH] fix: cleanup android deps (#1592) --- packages/app/android/app/build.gradle | 11 +---------- .../java/so/onekey/app/wallet/MainApplication.java | 10 +--------- .../so/onekey/app/wallet/reactModule/OKLiteManager.kt | 1 - 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/packages/app/android/app/build.gradle b/packages/app/android/app/build.gradle index 7dce2543085..493cfc38e9c 100644 --- a/packages/app/android/app/build.gradle +++ b/packages/app/android/app/build.gradle @@ -384,8 +384,6 @@ dependencies { // Custom Add Library // Lifecycle def lifecycle_version = "2.3.1" - implementation "androidx.lifecycle:lifecycle-extensions:2.2.0" - implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version" // Details see https://developer.android.com/training/constraint-layout?hl=zh-cn @@ -395,16 +393,9 @@ dependencies { implementation "androidx.recyclerview:recyclerview:1.2.1" implementation "androidx.fragment:fragment-ktx:1.3.6" - // Details see https://github.com/li-xiaojun/XPopup - implementation 'com.lxj:xpopup:2.2.23' - - // Details see https://github.com/bumptech/glide - implementation 'com.github.bumptech.glide:glide:4.12.0' - kapt 'com.github.bumptech.glide:compiler:4.12.0' - // Details see https://github.com/google/gson implementation 'com.google.code.gson:gson:2.8.9' - + // Details see https://developer.android.com/kotlin/coroutines?hl=zh-cn implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2' diff --git a/packages/app/android/app/src/main/java/so/onekey/app/wallet/MainApplication.java b/packages/app/android/app/src/main/java/so/onekey/app/wallet/MainApplication.java index b0df666bb45..ad9aca7ca14 100644 --- a/packages/app/android/app/src/main/java/so/onekey/app/wallet/MainApplication.java +++ b/packages/app/android/app/src/main/java/so/onekey/app/wallet/MainApplication.java @@ -8,8 +8,6 @@ import androidx.annotation.Keep; import androidx.annotation.NonNull; import android.database.CursorWindow; -import androidx.lifecycle.ViewModelStore; -import androidx.lifecycle.ViewModelStoreOwner; import com.facebook.react.PackageList; import com.facebook.react.ReactApplication; @@ -35,8 +33,7 @@ import io.csie.kudo.reactnative.v8.executor.V8ExecutorFactory; import cn.jiguang.plugins.push.JPushModule; -public class MainApplication extends Application implements ReactApplication , ViewModelStoreOwner { - private final ViewModelStore mViewModelStore = new ViewModelStore(); +public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mNewArchitectureNativeHost = new ReactNativeHostWrapper(this, new MainApplicationReactNativeHost(this)); private final ReactNativeHost mReactNativeHost = new ReactNativeHostWrapper( @@ -161,9 +158,4 @@ private static void initializeFlipper( } } - @NonNull - @Override - public ViewModelStore getViewModelStore() { - return mViewModelStore; - } } diff --git a/packages/app/android/app/src/main/java/so/onekey/app/wallet/reactModule/OKLiteManager.kt b/packages/app/android/app/src/main/java/so/onekey/app/wallet/reactModule/OKLiteManager.kt index 6ff4630fa17..12ed72fed1d 100644 --- a/packages/app/android/app/src/main/java/so/onekey/app/wallet/reactModule/OKLiteManager.kt +++ b/packages/app/android/app/src/main/java/so/onekey/app/wallet/reactModule/OKLiteManager.kt @@ -9,7 +9,6 @@ import androidx.annotation.IntDef import androidx.fragment.app.FragmentActivity import com.facebook.react.bridge.* import com.facebook.react.modules.core.DeviceEventManagerModule.RCTDeviceEventEmitter -import com.google.gson.Gson import kotlinx.coroutines.* import kotlinx.coroutines.channels.Channel import so.onekey.app.wallet.nfc.NFCExceptions