From 22a0efd2732994745660ac73d1114ce4b53fe94d Mon Sep 17 00:00:00 2001 From: Adolfo Santiago Date: Mon, 24 Jan 2022 11:03:16 +0100 Subject: [PATCH] New flavors: dev and newhusky As I explained earlier when I took over Husky maintenance, I'm making changes in the application to add stuff that would make it more maintenable in the long term, that is, an architecture, new stuff that would make the application better in performance, while also keeping all the good stuff of Husky. The flavor 'newhusky' is for that matter. I'm going to keep working on keeping Husky maintained, and at the same time I'll make the "new" Husky in another flavor. It won't change anything because, being two flavors, releases will be made with the current application, so be patient, please. --- husky/app/build.gradle.kts | 37 ++++++++++- .../keylesspalace/tusky/core/utils/Flavor.kt | 4 +- husky/app/src/newhusky/AndroidManifest.xml | 42 ++++++++++++ .../com/husky/project}/HuskyApplication.kt | 2 +- .../husky/project}/core/di/GlobalServices.kt | 2 +- .../project}/core/extensions/LifecycleExt.kt | 0 .../core/navigation/NavigationActivity.kt | 6 +- .../core/ui/fragment/BaseBackFragment.kt | 2 +- .../project}/core/ui/fragment/BaseFragment.kt | 2 +- .../project}/core/ui/navigation/BaseKey.kt | 2 +- .../core/ui/navigation/BaseServiceKey.kt | 2 +- .../core/ui/viewmodel/BaseViewModel.kt | 2 +- .../core/ui/viewmodel/ServicesViewModel.kt} | 4 +- .../login/view/fragments/LoginFragment.kt | 6 +- .../login/view/navigation/LoginKey.kt | 8 +-- .../login/view/viewmodel/LoginViewModel.kt | 11 ++-- .../view/viewmodel/LoginViewModelKeys.kt | 2 +- .../splash/view/fragments/SplashFragment.kt | 8 +-- .../splash/view/navigation/SplashKey.kt | 8 +-- .../splash/view/viewmodel/SplashViewModel.kt | 4 +- husky/build.gradle.kts | 64 +++++++++---------- .../buildSrc/src/main/kotlin/Dependencies.kt | 17 +++++ 22 files changed, 166 insertions(+), 69 deletions(-) create mode 100644 husky/app/src/newhusky/AndroidManifest.xml rename husky/app/src/{main/java/com/keylesspalace/tusky/refactor_features => newhusky/java/com/husky/project}/HuskyApplication.kt (91%) rename husky/app/src/{main/java/com/keylesspalace/tusky => newhusky/java/com/husky/project}/core/di/GlobalServices.kt (88%) rename husky/app/src/{main/java/com/keylesspalace/tusky => newhusky/java/com/husky/project}/core/extensions/LifecycleExt.kt (100%) rename husky/app/src/{main/java/com/keylesspalace/tusky => newhusky/java/com/husky/project}/core/navigation/NavigationActivity.kt (93%) rename husky/app/src/{main/java/com/keylesspalace/tusky => newhusky/java/com/husky/project}/core/ui/fragment/BaseBackFragment.kt (71%) rename husky/app/src/{main/java/com/keylesspalace/tusky => newhusky/java/com/husky/project}/core/ui/fragment/BaseFragment.kt (94%) rename husky/app/src/{main/java/com/keylesspalace/tusky => newhusky/java/com/husky/project}/core/ui/navigation/BaseKey.kt (94%) rename husky/app/src/{main/java/com/keylesspalace/tusky => newhusky/java/com/husky/project}/core/ui/navigation/BaseServiceKey.kt (94%) rename husky/app/src/{main/java/com/keylesspalace/tusky => newhusky/java/com/husky/project}/core/ui/viewmodel/BaseViewModel.kt (94%) rename husky/app/src/{main/java/com/keylesspalace/tusky/core/ui/viewmodel/RegisteredViewModel.kt => newhusky/java/com/husky/project/core/ui/viewmodel/ServicesViewModel.kt} (74%) rename husky/app/src/{main/java/com/keylesspalace/tusky/refactor_features => newhusky/java/com/husky/project/features}/login/view/fragments/LoginFragment.kt (90%) rename husky/app/src/{main/java/com/keylesspalace/tusky/refactor_features => newhusky/java/com/husky/project/features}/login/view/navigation/LoginKey.kt (58%) rename husky/app/src/{main/java/com/keylesspalace/tusky/refactor_features => newhusky/java/com/husky/project/features}/login/view/viewmodel/LoginViewModel.kt (70%) rename husky/app/src/{main/java/com/keylesspalace/tusky/refactor_features => newhusky/java/com/husky/project/features}/login/view/viewmodel/LoginViewModelKeys.kt (60%) rename husky/app/src/{main/java/com/keylesspalace/tusky/refactor_features => newhusky/java/com/husky/project/features}/splash/view/fragments/SplashFragment.kt (73%) rename husky/app/src/{main/java/com/keylesspalace/tusky/refactor_features => newhusky/java/com/husky/project/features}/splash/view/navigation/SplashKey.kt (60%) rename husky/app/src/{main/java/com/keylesspalace/tusky/refactor_features => newhusky/java/com/husky/project/features}/splash/view/viewmodel/SplashViewModel.kt (68%) diff --git a/husky/app/build.gradle.kts b/husky/app/build.gradle.kts index d2b4135..6ebee0a 100644 --- a/husky/app/build.gradle.kts +++ b/husky/app/build.gradle.kts @@ -1,5 +1,5 @@ -import com.project.starter.easylauncher.filter.ColorRibbonFilter import com.android.build.gradle.internal.api.BaseVariantOutputImpl +import com.project.starter.easylauncher.filter.ColorRibbonFilter plugins { id(AppPlugins.androidApplication) @@ -81,10 +81,34 @@ android { ) ) productFlavors { + create(Flavors.newhusky) { + dimension = Flavors.Dimensions.release + + applicationId = DefaultConfig.NewHusky.applicationID + + minSdk = DefaultConfig.minSdk + targetSdk = DefaultConfig.targetSdk + + versionCode = DefaultConfig.NewHusky.versionCode + versionName = DefaultConfig.NewHusky.versionName + } + create(Flavors.husky) { dimension = Flavors.Dimensions.husky } + create(Flavors.dev) { + dimension = Flavors.Dimensions.release + + applicationId = DefaultConfig.Dev.applicationID + + minSdk = DefaultConfig.minSdk + targetSdk = DefaultConfig.targetSdk + + versionCode = DefaultConfig.Dev.versionCode + versionName = DefaultConfig.Dev.versionName + } + create(Flavors.beta) { dimension = Flavors.Dimensions.release @@ -258,5 +282,16 @@ easylauncher { ) ) } + + register(Flavors.newhusky) { + filters( + customRibbon( + label = "NEW", + gravity = ColorRibbonFilter.Gravity.TOPRIGHT, + ribbonColor = "#DCDCDC", + labelColor = "#000000" + ) + ) + } } } diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/core/utils/Flavor.kt b/husky/app/src/main/java/com/keylesspalace/tusky/core/utils/Flavor.kt index b0c51e1..48e996f 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/core/utils/Flavor.kt +++ b/husky/app/src/main/java/com/keylesspalace/tusky/core/utils/Flavor.kt @@ -22,7 +22,8 @@ package com.keylesspalace.tusky.core.utils enum class Flavor(private val flavor: String) { BETA("huskyBeta"), - STABLE("huskyStable"); + STABLE("huskyStable"), + NEW_HUSKY("huskyNewhusky"); companion object { @@ -35,6 +36,7 @@ enum class Flavor(private val flavor: String) { fun getFlavor(flavor: String) = when(flavor) { BETA.flavor -> BETA + NEW_HUSKY.flavor -> NEW_HUSKY else -> STABLE } } diff --git a/husky/app/src/newhusky/AndroidManifest.xml b/husky/app/src/newhusky/AndroidManifest.xml new file mode 100644 index 0000000..9d68d06 --- /dev/null +++ b/husky/app/src/newhusky/AndroidManifest.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/HuskyApplication.kt b/husky/app/src/newhusky/java/com/husky/project/HuskyApplication.kt similarity index 91% rename from husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/HuskyApplication.kt rename to husky/app/src/newhusky/java/com/husky/project/HuskyApplication.kt index 6f656ae..6c404a1 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/HuskyApplication.kt +++ b/husky/app/src/newhusky/java/com/husky/project/HuskyApplication.kt @@ -1,4 +1,4 @@ -package com.keylesspalace.tusky.refactor_features +package com.husky.project import android.app.Application import com.keylesspalace.tusky.core.logging.HyperlinkDebugTree diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/core/di/GlobalServices.kt b/husky/app/src/newhusky/java/com/husky/project/core/di/GlobalServices.kt similarity index 88% rename from husky/app/src/main/java/com/keylesspalace/tusky/core/di/GlobalServices.kt rename to husky/app/src/newhusky/java/com/husky/project/core/di/GlobalServices.kt index bd3d807..bc68b52 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/core/di/GlobalServices.kt +++ b/husky/app/src/newhusky/java/com/husky/project/core/di/GlobalServices.kt @@ -1,4 +1,4 @@ -package com.keylesspalace.tusky.core.di +package com.husky.project.core.di import android.content.Context import com.zhuinden.simplestack.GlobalServices diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/core/extensions/LifecycleExt.kt b/husky/app/src/newhusky/java/com/husky/project/core/extensions/LifecycleExt.kt similarity index 100% rename from husky/app/src/main/java/com/keylesspalace/tusky/core/extensions/LifecycleExt.kt rename to husky/app/src/newhusky/java/com/husky/project/core/extensions/LifecycleExt.kt diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/core/navigation/NavigationActivity.kt b/husky/app/src/newhusky/java/com/husky/project/core/navigation/NavigationActivity.kt similarity index 93% rename from husky/app/src/main/java/com/keylesspalace/tusky/core/navigation/NavigationActivity.kt rename to husky/app/src/newhusky/java/com/husky/project/core/navigation/NavigationActivity.kt index 27ddee0..65cd95c 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/core/navigation/NavigationActivity.kt +++ b/husky/app/src/newhusky/java/com/husky/project/core/navigation/NavigationActivity.kt @@ -17,14 +17,14 @@ * along with this program. If not, see . */ -package com.keylesspalace.tusky.core.navigation +package com.husky.project.core.navigation import android.os.Bundle import androidx.appcompat.app.AppCompatActivity -import com.keylesspalace.tusky.core.di.HuskyServices +import com.husky.project.core.di.HuskyServices import com.keylesspalace.tusky.core.extensions.viewBinding import com.keylesspalace.tusky.databinding.ActivityNavigationBinding -import com.keylesspalace.tusky.refactor_features.splash.view.navigation.SplashKey +import com.husky.project.features.splash.view.navigation.SplashKey import com.zhuinden.simplestack.History import com.zhuinden.simplestack.SimpleStateChanger import com.zhuinden.simplestack.StateChange diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/core/ui/fragment/BaseBackFragment.kt b/husky/app/src/newhusky/java/com/husky/project/core/ui/fragment/BaseBackFragment.kt similarity index 71% rename from husky/app/src/main/java/com/keylesspalace/tusky/core/ui/fragment/BaseBackFragment.kt rename to husky/app/src/newhusky/java/com/husky/project/core/ui/fragment/BaseBackFragment.kt index a18da21..958ecb8 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/core/ui/fragment/BaseBackFragment.kt +++ b/husky/app/src/newhusky/java/com/husky/project/core/ui/fragment/BaseBackFragment.kt @@ -1,4 +1,4 @@ -package com.keylesspalace.tusky.core.ui.fragment +package com.husky.project.core.ui.fragment abstract class BaseBackFragment(layoutRes: Int) : BaseFragment(layoutRes) { diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/core/ui/fragment/BaseFragment.kt b/husky/app/src/newhusky/java/com/husky/project/core/ui/fragment/BaseFragment.kt similarity index 94% rename from husky/app/src/main/java/com/keylesspalace/tusky/core/ui/fragment/BaseFragment.kt rename to husky/app/src/newhusky/java/com/husky/project/core/ui/fragment/BaseFragment.kt index b63a35c..c43fd1e 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/core/ui/fragment/BaseFragment.kt +++ b/husky/app/src/newhusky/java/com/husky/project/core/ui/fragment/BaseFragment.kt @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package com.keylesspalace.tusky.core.ui.fragment +package com.husky.project.core.ui.fragment import com.zhuinden.simplestackextensions.fragments.KeyedFragment diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/core/ui/navigation/BaseKey.kt b/husky/app/src/newhusky/java/com/husky/project/core/ui/navigation/BaseKey.kt similarity index 94% rename from husky/app/src/main/java/com/keylesspalace/tusky/core/ui/navigation/BaseKey.kt rename to husky/app/src/newhusky/java/com/husky/project/core/ui/navigation/BaseKey.kt index 6713aca..8bcd646 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/core/ui/navigation/BaseKey.kt +++ b/husky/app/src/newhusky/java/com/husky/project/core/ui/navigation/BaseKey.kt @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package com.keylesspalace.tusky.core.ui.navigation +package com.husky.project.core.ui.navigation import com.zhuinden.simplestackextensions.fragments.DefaultFragmentKey diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/core/ui/navigation/BaseServiceKey.kt b/husky/app/src/newhusky/java/com/husky/project/core/ui/navigation/BaseServiceKey.kt similarity index 94% rename from husky/app/src/main/java/com/keylesspalace/tusky/core/ui/navigation/BaseServiceKey.kt rename to husky/app/src/newhusky/java/com/husky/project/core/ui/navigation/BaseServiceKey.kt index c7f4845..bd3ce52 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/core/ui/navigation/BaseServiceKey.kt +++ b/husky/app/src/newhusky/java/com/husky/project/core/ui/navigation/BaseServiceKey.kt @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package com.keylesspalace.tusky.core.ui.navigation +package com.husky.project.core.ui.navigation import com.zhuinden.simplestackextensions.services.DefaultServiceProvider diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/core/ui/viewmodel/BaseViewModel.kt b/husky/app/src/newhusky/java/com/husky/project/core/ui/viewmodel/BaseViewModel.kt similarity index 94% rename from husky/app/src/main/java/com/keylesspalace/tusky/core/ui/viewmodel/BaseViewModel.kt rename to husky/app/src/newhusky/java/com/husky/project/core/ui/viewmodel/BaseViewModel.kt index b418a55..eae221a 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/core/ui/viewmodel/BaseViewModel.kt +++ b/husky/app/src/newhusky/java/com/husky/project/core/ui/viewmodel/BaseViewModel.kt @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package com.keylesspalace.tusky.core.ui.viewmodel +package com.husky.project.core.ui.viewmodel import com.zhuinden.simplestack.Bundleable diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/core/ui/viewmodel/RegisteredViewModel.kt b/husky/app/src/newhusky/java/com/husky/project/core/ui/viewmodel/ServicesViewModel.kt similarity index 74% rename from husky/app/src/main/java/com/keylesspalace/tusky/core/ui/viewmodel/RegisteredViewModel.kt rename to husky/app/src/newhusky/java/com/husky/project/core/ui/viewmodel/ServicesViewModel.kt index 0d52f9f..d53e39b 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/core/ui/viewmodel/RegisteredViewModel.kt +++ b/husky/app/src/newhusky/java/com/husky/project/core/ui/viewmodel/ServicesViewModel.kt @@ -1,10 +1,10 @@ -package com.keylesspalace.tusky.core.ui.viewmodel +package com.husky.project.core.ui.viewmodel import com.zhuinden.simplestack.ScopedServices import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.Disposable -abstract class RegisteredViewModel : BaseViewModel(), ScopedServices.Registered { +abstract class ServicesViewModel : BaseViewModel(), ScopedServices.Registered { private val compositeDisposable = CompositeDisposable() diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/login/view/fragments/LoginFragment.kt b/husky/app/src/newhusky/java/com/husky/project/features/login/view/fragments/LoginFragment.kt similarity index 90% rename from husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/login/view/fragments/LoginFragment.kt rename to husky/app/src/newhusky/java/com/husky/project/features/login/view/fragments/LoginFragment.kt index 3dcb4a3..bbfdb12 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/login/view/fragments/LoginFragment.kt +++ b/husky/app/src/newhusky/java/com/husky/project/features/login/view/fragments/LoginFragment.kt @@ -1,4 +1,4 @@ -package com.keylesspalace.tusky.refactor_features.login.view.fragments +package com.husky.project.features.login.view.fragments import android.os.Bundle import android.view.View @@ -8,9 +8,9 @@ import com.keylesspalace.tusky.core.extensions.addHttpsProtocolUrl import com.keylesspalace.tusky.core.extensions.dialogWithLink import com.keylesspalace.tusky.core.extensions.viewBinding import com.keylesspalace.tusky.core.extensions.viewObserve -import com.keylesspalace.tusky.core.ui.fragment.BaseFragment +import com.husky.project.core.ui.fragment.BaseFragment import com.keylesspalace.tusky.databinding.ActivityLoginBinding -import com.keylesspalace.tusky.refactor_features.login.view.viewmodel.LoginViewModel +import com.husky.project.features.login.view.viewmodel.LoginViewModel import com.keylesspalace.tusky.util.afterTextChanged import com.zhuinden.simplestackextensions.fragmentsktx.lookup diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/login/view/navigation/LoginKey.kt b/husky/app/src/newhusky/java/com/husky/project/features/login/view/navigation/LoginKey.kt similarity index 58% rename from husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/login/view/navigation/LoginKey.kt rename to husky/app/src/newhusky/java/com/husky/project/features/login/view/navigation/LoginKey.kt index 95c0e92..c8d7b54 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/login/view/navigation/LoginKey.kt +++ b/husky/app/src/newhusky/java/com/husky/project/features/login/view/navigation/LoginKey.kt @@ -1,9 +1,9 @@ -package com.keylesspalace.tusky.refactor_features.login.view.navigation +package com.husky.project.features.login.view.navigation import androidx.fragment.app.Fragment -import com.keylesspalace.tusky.core.ui.navigation.BaseServiceKey -import com.keylesspalace.tusky.refactor_features.login.view.fragments.LoginFragment -import com.keylesspalace.tusky.refactor_features.login.view.viewmodel.LoginViewModel +import com.husky.project.core.ui.navigation.BaseServiceKey +import com.husky.project.features.login.view.fragments.LoginFragment +import com.husky.project.features.login.view.viewmodel.LoginViewModel import com.zhuinden.simplestack.ServiceBinder import com.zhuinden.simplestackextensions.servicesktx.add import kotlinx.android.parcel.Parcelize diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/login/view/viewmodel/LoginViewModel.kt b/husky/app/src/newhusky/java/com/husky/project/features/login/view/viewmodel/LoginViewModel.kt similarity index 70% rename from husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/login/view/viewmodel/LoginViewModel.kt rename to husky/app/src/newhusky/java/com/husky/project/features/login/view/viewmodel/LoginViewModel.kt index 8bd13da..c503916 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/login/view/viewmodel/LoginViewModel.kt +++ b/husky/app/src/newhusky/java/com/husky/project/features/login/view/viewmodel/LoginViewModel.kt @@ -1,13 +1,14 @@ -package com.keylesspalace.tusky.refactor_features.login.view.viewmodel +package com.husky.project.features.login.view.viewmodel import android.util.Patterns import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData +import com.husky.project.features.login.view.viewmodel.LoginViewModelKeys.Bundle import com.keylesspalace.tusky.core.extensions.orEmpty -import com.keylesspalace.tusky.core.ui.viewmodel.RegisteredViewModel +import com.husky.project.core.ui.viewmodel.ServicesViewModel import com.zhuinden.statebundle.StateBundle -class LoginViewModel : RegisteredViewModel() { +class LoginViewModel : ServicesViewModel() { private val mVerifyUrl = MutableLiveData() val verifyUrl: LiveData @@ -15,14 +16,14 @@ class LoginViewModel : RegisteredViewModel() { override fun toBundle(): StateBundle = StateBundle().apply { putBoolean( - LoginViewModelKeys.Bundle.VERIFY_URL, + Bundle.VERIFY_URL, mVerifyUrl.value.orEmpty() ) } override fun fromBundle(bundle: StateBundle?) { bundle?.run { - mVerifyUrl.value = getBoolean(LoginViewModelKeys.Bundle.VERIFY_URL) + mVerifyUrl.value = getBoolean(Bundle.VERIFY_URL) } } diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/login/view/viewmodel/LoginViewModelKeys.kt b/husky/app/src/newhusky/java/com/husky/project/features/login/view/viewmodel/LoginViewModelKeys.kt similarity index 60% rename from husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/login/view/viewmodel/LoginViewModelKeys.kt rename to husky/app/src/newhusky/java/com/husky/project/features/login/view/viewmodel/LoginViewModelKeys.kt index d70576a..18fd34a 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/login/view/viewmodel/LoginViewModelKeys.kt +++ b/husky/app/src/newhusky/java/com/husky/project/features/login/view/viewmodel/LoginViewModelKeys.kt @@ -1,4 +1,4 @@ -package com.keylesspalace.tusky.refactor_features.login.view.viewmodel +package com.husky.project.features.login.view.viewmodel sealed class LoginViewModelKeys { diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/splash/view/fragments/SplashFragment.kt b/husky/app/src/newhusky/java/com/husky/project/features/splash/view/fragments/SplashFragment.kt similarity index 73% rename from husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/splash/view/fragments/SplashFragment.kt rename to husky/app/src/newhusky/java/com/husky/project/features/splash/view/fragments/SplashFragment.kt index 5eabaf8..968487a 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/splash/view/fragments/SplashFragment.kt +++ b/husky/app/src/newhusky/java/com/husky/project/features/splash/view/fragments/SplashFragment.kt @@ -1,13 +1,13 @@ -package com.keylesspalace.tusky.refactor_features.splash.view.fragments +package com.husky.project.features.splash.view.fragments import android.os.Bundle import android.view.View import com.keylesspalace.tusky.R import com.keylesspalace.tusky.core.extensions.viewBinding -import com.keylesspalace.tusky.core.ui.fragment.BaseFragment +import com.husky.project.core.ui.fragment.BaseFragment import com.keylesspalace.tusky.databinding.FragmentSplashBinding -import com.keylesspalace.tusky.refactor_features.login.view.navigation.LoginKey -import com.keylesspalace.tusky.refactor_features.splash.view.viewmodel.SplashViewModel +import com.husky.project.features.login.view.navigation.LoginKey +import com.husky.project.features.splash.view.viewmodel.SplashViewModel import com.zhuinden.simplestack.History import com.zhuinden.simplestack.StateChange import com.zhuinden.simplestackextensions.fragmentsktx.backstack diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/splash/view/navigation/SplashKey.kt b/husky/app/src/newhusky/java/com/husky/project/features/splash/view/navigation/SplashKey.kt similarity index 60% rename from husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/splash/view/navigation/SplashKey.kt rename to husky/app/src/newhusky/java/com/husky/project/features/splash/view/navigation/SplashKey.kt index f56a6de..fdcbb35 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/splash/view/navigation/SplashKey.kt +++ b/husky/app/src/newhusky/java/com/husky/project/features/splash/view/navigation/SplashKey.kt @@ -1,9 +1,9 @@ -package com.keylesspalace.tusky.refactor_features.splash.view.navigation +package com.husky.project.features.splash.view.navigation import androidx.fragment.app.Fragment -import com.keylesspalace.tusky.core.ui.navigation.BaseServiceKey -import com.keylesspalace.tusky.refactor_features.splash.view.fragments.SplashFragment -import com.keylesspalace.tusky.refactor_features.splash.view.viewmodel.SplashViewModel +import com.husky.project.core.ui.navigation.BaseServiceKey +import com.husky.project.features.splash.view.fragments.SplashFragment +import com.husky.project.features.splash.view.viewmodel.SplashViewModel import com.zhuinden.simplestack.ServiceBinder import com.zhuinden.simplestackextensions.servicesktx.add import kotlinx.android.parcel.Parcelize diff --git a/husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/splash/view/viewmodel/SplashViewModel.kt b/husky/app/src/newhusky/java/com/husky/project/features/splash/view/viewmodel/SplashViewModel.kt similarity index 68% rename from husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/splash/view/viewmodel/SplashViewModel.kt rename to husky/app/src/newhusky/java/com/husky/project/features/splash/view/viewmodel/SplashViewModel.kt index bcbf884..9410913 100644 --- a/husky/app/src/main/java/com/keylesspalace/tusky/refactor_features/splash/view/viewmodel/SplashViewModel.kt +++ b/husky/app/src/newhusky/java/com/husky/project/features/splash/view/viewmodel/SplashViewModel.kt @@ -1,6 +1,6 @@ -package com.keylesspalace.tusky.refactor_features.splash.view.viewmodel +package com.husky.project.features.splash.view.viewmodel -import com.keylesspalace.tusky.core.ui.viewmodel.BaseViewModel +import com.husky.project.core.ui.viewmodel.BaseViewModel import com.zhuinden.statebundle.StateBundle class SplashViewModel : BaseViewModel() { diff --git a/husky/build.gradle.kts b/husky/build.gradle.kts index dcc32ca..43cb869 100644 --- a/husky/build.gradle.kts +++ b/husky/build.gradle.kts @@ -1,48 +1,48 @@ import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask buildscript { - addRepos(repositories) + addRepos(repositories) - dependencies { - // Base - classpath(GradlePlugins.android) - classpath(GradlePlugins.kotlin) + dependencies { + // Base + classpath(GradlePlugins.android) + classpath(GradlePlugins.kotlin) - // Plugins - classpath(GradlePlugins.gradleVersions) - } + // Plugins + classpath(GradlePlugins.gradleVersions) + } } allprojects { - addRepos(repositories) + addRepos(repositories) - tasks.withType { - options.encoding = DefaultConfig.encoding - options.compilerArgs.addAll( - listOf( - "-Xlint:all", - "-Xlint:unchecked", - "-Xlint:-deprecation" - ) - ) - } + tasks.withType { + options.encoding = DefaultConfig.encoding + options.compilerArgs.addAll( + listOf( + "-Xlint:all", + "-Xlint:unchecked", + "-Xlint:-deprecation" + ) + ) + } - apply { - plugin(AppPlugins.manesVersions) - } + apply { + plugin(AppPlugins.manesVersions) + } - tasks.withType { - gradleReleaseChannel = "current" + tasks.withType { + gradleReleaseChannel = "current" - rejectVersionIf { - !isNonStable(candidate.version) - } - } + rejectVersionIf { + !isNonStable(candidate.version) + } + } } tasks.register(BuildTasks.taskTypeClean) { - delete(buildDir) - delete("${projectDir}/buildSrc/build") - delete("${projectDir}/app/huskyBeta") - delete("${projectDir}/app/huskyStable") + delete(buildDir) + delete("${projectDir}/buildSrc/build") + delete("${projectDir}/app/huskyBeta") + delete("${projectDir}/app/huskyStable") } diff --git a/husky/buildSrc/src/main/kotlin/Dependencies.kt b/husky/buildSrc/src/main/kotlin/Dependencies.kt index 247d032..e956c6e 100644 --- a/husky/buildSrc/src/main/kotlin/Dependencies.kt +++ b/husky/buildSrc/src/main/kotlin/Dependencies.kt @@ -30,6 +30,20 @@ object DefaultConfig { const val instrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" const val encoding = "UTF-8" + + object Dev { + const val applicationID = "su.xash.husky.dev" + + const val versionCode = 1 + const val versionName = "1.0.0" + } + + object NewHusky { + const val applicationID = "su.xash.husky.alpha" + + const val versionCode = 1 + const val versionName = "2.0.0" + } } object BetaConfig { @@ -49,8 +63,11 @@ object Flavors { } const val husky = "husky" + const val dev = "dev" const val beta = "beta" const val stable = "stable" + + const val newhusky = "newhusky" } object ProguardFile {