From dc4842082051f67e645c8f8a06f6517022f246c5 Mon Sep 17 00:00:00 2001 From: Brian Yencho Date: Tue, 5 Sep 2023 13:13:26 -0500 Subject: [PATCH] BIT-200: Update CODEOWNERS file and restructure folders accordingly (#26) --- .github/CODEOWNERS | 39 +++++++++++++++++++ .../java/com/x8bit/bitwarden/MainActivity.kt | 4 +- .../datasource/network/api/ConfigApi.kt | 4 +- .../datasource/network/core}/ResultCall.kt | 2 +- .../network/core}/ResultCallAdapter.kt | 2 +- .../network/core}/ResultCallAdapterFactory.kt | 2 +- .../datasource/network/di/NetworkModule.kt | 6 +-- .../network/model}/ConfigResponseJson.kt | 2 +- .../{ => auth}/feature/auth/AuthNavigation.kt | 10 ++--- .../createaccount/CreateAccountNavigation.kt | 2 +- .../createaccount/CreateAccountScreen.kt | 6 +-- .../createaccount/CreateAccountViewModel.kt | 4 +- .../feature/landing/LandingNavigation.kt | 2 +- .../feature/landing/LandingScreen.kt | 6 +-- .../feature/landing/LandingViewModel.kt | 4 +- .../ui/{ => platform}/base/BaseViewModel.kt | 2 +- .../{ => platform}/base/util/EventsEffect.kt | 4 +- .../components/BitwardenTextField.kt | 2 +- .../components/PlaceholderComposable.kt | 2 +- .../feature/rootnav/RootNavScreen.kt | 8 ++-- .../feature/rootnav/RootNavViewModel.kt | 4 +- .../ui/{ => platform}/theme/Theme.kt | 2 +- .../bitwarden/ui/{ => platform}/theme/Type.kt | 2 +- .../network/core}/ResultCallAdapterTest.kt | 3 +- .../createaccount/CreateAccountScreenTest.kt | 10 ++--- .../CreateAccountViewModelTest.kt | 10 ++--- .../feature/landing/LandingScreenTest.kt | 12 +++--- .../feature/landing/LandingViewModelTest.kt | 12 +++--- .../platform/base}/BaseComposeTest.kt | 2 +- .../platform/base}/BaseViewModelTest.kt | 3 +- .../platform/base}/MainDispatcherExtension.kt | 4 +- .../feature/rootnav/RootNavViewModelTest.kt | 6 +-- 32 files changed, 108 insertions(+), 75 deletions(-) rename app/src/main/java/com/x8bit/bitwarden/data/{ => platform}/datasource/network/api/ConfigApi.kt (71%) rename app/src/main/java/com/x8bit/bitwarden/data/{datasource/network => platform/datasource/network/core}/ResultCall.kt (96%) rename app/src/main/java/com/x8bit/bitwarden/data/{datasource/network => platform/datasource/network/core}/ResultCallAdapter.kt (85%) rename app/src/main/java/com/x8bit/bitwarden/data/{datasource/network => platform/datasource/network/core}/ResultCallAdapterFactory.kt (93%) rename app/src/main/java/com/x8bit/bitwarden/data/{ => platform}/datasource/network/di/NetworkModule.kt (87%) rename app/src/main/java/com/x8bit/bitwarden/data/{datasource/network/models => platform/datasource/network/model}/ConfigResponseJson.kt (97%) rename app/src/main/java/com/x8bit/bitwarden/ui/{ => auth}/feature/auth/AuthNavigation.kt (71%) rename app/src/main/java/com/x8bit/bitwarden/ui/{ => auth}/feature/createaccount/CreateAccountNavigation.kt (91%) rename app/src/main/java/com/x8bit/bitwarden/ui/{ => auth}/feature/createaccount/CreateAccountScreen.kt (93%) rename app/src/main/java/com/x8bit/bitwarden/ui/{ => auth}/feature/createaccount/CreateAccountViewModel.kt (90%) rename app/src/main/java/com/x8bit/bitwarden/ui/{ => auth}/feature/landing/LandingNavigation.kt (92%) rename app/src/main/java/com/x8bit/bitwarden/ui/{ => auth}/feature/landing/LandingScreen.kt (96%) rename app/src/main/java/com/x8bit/bitwarden/ui/{ => auth}/feature/landing/LandingViewModel.kt (95%) rename app/src/main/java/com/x8bit/bitwarden/ui/{ => platform}/base/BaseViewModel.kt (98%) rename app/src/main/java/com/x8bit/bitwarden/ui/{ => platform}/base/util/EventsEffect.kt (81%) rename app/src/main/java/com/x8bit/bitwarden/ui/{ => platform}/components/BitwardenTextField.kt (96%) rename app/src/main/java/com/x8bit/bitwarden/ui/{ => platform}/components/PlaceholderComposable.kt (93%) rename app/src/main/java/com/x8bit/bitwarden/ui/{ => platform}/feature/rootnav/RootNavScreen.kt (89%) rename app/src/main/java/com/x8bit/bitwarden/ui/{ => platform}/feature/rootnav/RootNavViewModel.kt (88%) rename app/src/main/java/com/x8bit/bitwarden/ui/{ => platform}/theme/Theme.kt (98%) rename app/src/main/java/com/x8bit/bitwarden/ui/{ => platform}/theme/Type.kt (90%) rename app/src/test/java/com/x8bit/bitwarden/{example => data/platform/datasource/network/core}/ResultCallAdapterTest.kt (92%) rename app/src/test/java/com/x8bit/bitwarden/{example/ui => ui/auth}/feature/createaccount/CreateAccountScreenTest.kt (69%) rename app/src/test/java/com/x8bit/bitwarden/{example/ui => ui/auth}/feature/createaccount/CreateAccountViewModelTest.kt (57%) rename app/src/test/java/com/x8bit/bitwarden/{example/ui => ui/auth}/feature/landing/LandingScreenTest.kt (76%) rename app/src/test/java/com/x8bit/bitwarden/{example/ui => ui/auth}/feature/landing/LandingViewModelTest.kt (81%) rename app/src/test/java/com/x8bit/bitwarden/{example/ui => ui/platform/base}/BaseComposeTest.kt (93%) rename app/src/test/java/com/x8bit/bitwarden/{example/ui => ui/platform/base}/BaseViewModelTest.kt (66%) rename app/src/test/java/com/x8bit/bitwarden/{example => ui/platform/base}/MainDispatcherExtension.kt (91%) rename app/src/test/java/com/x8bit/bitwarden/{example/ui => ui/platform}/feature/rootnav/RootNavViewModelTest.kt (72%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bfd64133c..369bff219 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -9,3 +9,42 @@ # DevOps for Actions and other workflow changes. .github/workflows @bitwarden/dept-devops + +# Auth +app/src/main/java/com/x8bit/bitwarden/data/auth @bitwarden/team-auth-dev +app/src/main/java/com/x8bit/bitwarden/ui/auth @bitwarden/team-auth-dev +app/src/test/java/com/x8bit/bitwarden/data/auth @bitwarden/team-auth-dev +app/src/test/java/com/x8bit/bitwarden/ui/auth @bitwarden/team-auth-dev + +# AutoFill +app/src/main/java/com/x8bit/bitwarden/data/autofill @bitwarden/team-autofill-dev +app/src/main/java/com/x8bit/bitwarden/ui/autofill @bitwarden/team-autofill-dev +app/src/test/java/com/x8bit/bitwarden/data/autofill @bitwarden/team-autofill-dev +app/src/test/java/com/x8bit/bitwarden/ui/autofill @bitwarden/team-autofill-dev + +# Platform +app/src/main/java/com/x8bit/bitwarden/data/platform @bitwarden/team-platform-dev +app/src/main/java/com/x8bit/bitwarden/ui/platform @bitwarden/team-platform-dev +app/src/main/java/com/x8bit/bitwarden/ui/BitwardenApplication.kt @bitwarden/team-platform-dev +app/src/main/java/com/x8bit/bitwarden/ui/MainActivity.kt @bitwarden/team-platform-dev +app/src/main/res @bitwarden/team-platform-dev +app/src/main/AndroidManifest.xml @bitwarden/team-platform-dev +app/src/test/java/com/x8bit/bitwarden/data/platform @bitwarden/team-platform-dev +app/src/test/java/com/x8bit/bitwarden/ui/platform @bitwarden/team-platform-dev +app/src/.gitignore @bitwarden/team-platform-dev +app/src/build.gradle.kts @bitwarden/team-platform-dev +app/src/proguard-rules.pro @bitwarden/team-platform-dev +docs @bitwarden/team-platform-dev +gradle @bitwarden/team-platform-dev + +# Tools +app/src/main/java/com/x8bit/bitwarden/data/tools @bitwarden/team-tools-dev +app/src/main/java/com/x8bit/bitwarden/ui/tools @bitwarden/team-tools-dev +app/src/test/java/com/x8bit/bitwarden/data/tools @bitwarden/team-tools-dev +app/src/test/java/com/x8bit/bitwarden/ui/tools @bitwarden/team-tools-dev + +# Vault +app/src/main/java/com/x8bit/bitwarden/data/vault @bitwarden/team-vault-dev +app/src/main/java/com/x8bit/bitwarden/ui/vault @bitwarden/team-vault-dev +app/src/test/java/com/x8bit/bitwarden/data/vault @bitwarden/team-vault-dev +app/src/test/java/com/x8bit/bitwarden/ui/vault @bitwarden/team-vault-dev diff --git a/app/src/main/java/com/x8bit/bitwarden/MainActivity.kt b/app/src/main/java/com/x8bit/bitwarden/MainActivity.kt index c594fdbd8..233056b8a 100644 --- a/app/src/main/java/com/x8bit/bitwarden/MainActivity.kt +++ b/app/src/main/java/com/x8bit/bitwarden/MainActivity.kt @@ -3,8 +3,8 @@ package com.x8bit.bitwarden import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent -import com.x8bit.bitwarden.ui.feature.rootnav.RootNavScreen -import com.x8bit.bitwarden.ui.theme.BitwardenTheme +import com.x8bit.bitwarden.ui.platform.feature.rootnav.RootNavScreen +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import dagger.hilt.android.AndroidEntryPoint /** diff --git a/app/src/main/java/com/x8bit/bitwarden/data/datasource/network/api/ConfigApi.kt b/app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/api/ConfigApi.kt similarity index 71% rename from app/src/main/java/com/x8bit/bitwarden/data/datasource/network/api/ConfigApi.kt rename to app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/api/ConfigApi.kt index b3b3a71e1..48930440f 100644 --- a/app/src/main/java/com/x8bit/bitwarden/data/datasource/network/api/ConfigApi.kt +++ b/app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/api/ConfigApi.kt @@ -1,6 +1,6 @@ -package com.x8bit.bitwarden.data.datasource.network.api +package com.x8bit.bitwarden.data.platform.datasource.network.api -import com.x8bit.bitwarden.data.datasource.network.models.ConfigResponseJson +import com.x8bit.bitwarden.data.platform.datasource.network.model.ConfigResponseJson import retrofit2.http.GET /** diff --git a/app/src/main/java/com/x8bit/bitwarden/data/datasource/network/ResultCall.kt b/app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/core/ResultCall.kt similarity index 96% rename from app/src/main/java/com/x8bit/bitwarden/data/datasource/network/ResultCall.kt rename to app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/core/ResultCall.kt index 294505eb2..9031a077a 100644 --- a/app/src/main/java/com/x8bit/bitwarden/data/datasource/network/ResultCall.kt +++ b/app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/core/ResultCall.kt @@ -1,4 +1,4 @@ -package com.x8bit.bitwarden.data.datasource.network +package com.x8bit.bitwarden.data.platform.datasource.network.core import okhttp3.Request import okio.Timeout diff --git a/app/src/main/java/com/x8bit/bitwarden/data/datasource/network/ResultCallAdapter.kt b/app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/core/ResultCallAdapter.kt similarity index 85% rename from app/src/main/java/com/x8bit/bitwarden/data/datasource/network/ResultCallAdapter.kt rename to app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/core/ResultCallAdapter.kt index 65ec931c4..88e758d18 100644 --- a/app/src/main/java/com/x8bit/bitwarden/data/datasource/network/ResultCallAdapter.kt +++ b/app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/core/ResultCallAdapter.kt @@ -1,4 +1,4 @@ -package com.x8bit.bitwarden.data.datasource.network +package com.x8bit.bitwarden.data.platform.datasource.network.core import retrofit2.Call import retrofit2.CallAdapter diff --git a/app/src/main/java/com/x8bit/bitwarden/data/datasource/network/ResultCallAdapterFactory.kt b/app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/core/ResultCallAdapterFactory.kt similarity index 93% rename from app/src/main/java/com/x8bit/bitwarden/data/datasource/network/ResultCallAdapterFactory.kt rename to app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/core/ResultCallAdapterFactory.kt index fcc767018..4b808aa42 100644 --- a/app/src/main/java/com/x8bit/bitwarden/data/datasource/network/ResultCallAdapterFactory.kt +++ b/app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/core/ResultCallAdapterFactory.kt @@ -1,4 +1,4 @@ -package com.x8bit.bitwarden.data.datasource.network +package com.x8bit.bitwarden.data.platform.datasource.network.core import retrofit2.Call import retrofit2.CallAdapter diff --git a/app/src/main/java/com/x8bit/bitwarden/data/datasource/network/di/NetworkModule.kt b/app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/di/NetworkModule.kt similarity index 87% rename from app/src/main/java/com/x8bit/bitwarden/data/datasource/network/di/NetworkModule.kt rename to app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/di/NetworkModule.kt index 4f076133f..4f9b313eb 100644 --- a/app/src/main/java/com/x8bit/bitwarden/data/datasource/network/di/NetworkModule.kt +++ b/app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/di/NetworkModule.kt @@ -1,8 +1,8 @@ -package com.x8bit.bitwarden.data.datasource.network.di +package com.x8bit.bitwarden.data.platform.datasource.network.di import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory -import com.x8bit.bitwarden.data.datasource.network.ResultCallAdapterFactory -import com.x8bit.bitwarden.data.datasource.network.api.ConfigApi +import com.x8bit.bitwarden.data.platform.datasource.network.api.ConfigApi +import com.x8bit.bitwarden.data.platform.datasource.network.core.ResultCallAdapterFactory import dagger.Module import dagger.Provides import dagger.hilt.InstallIn diff --git a/app/src/main/java/com/x8bit/bitwarden/data/datasource/network/models/ConfigResponseJson.kt b/app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/model/ConfigResponseJson.kt similarity index 97% rename from app/src/main/java/com/x8bit/bitwarden/data/datasource/network/models/ConfigResponseJson.kt rename to app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/model/ConfigResponseJson.kt index c573b2a55..6e8314dfe 100644 --- a/app/src/main/java/com/x8bit/bitwarden/data/datasource/network/models/ConfigResponseJson.kt +++ b/app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/network/model/ConfigResponseJson.kt @@ -1,4 +1,4 @@ -package com.x8bit.bitwarden.data.datasource.network.models +package com.x8bit.bitwarden.data.platform.datasource.network.model import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/feature/auth/AuthNavigation.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/auth/AuthNavigation.kt similarity index 71% rename from app/src/main/java/com/x8bit/bitwarden/ui/feature/auth/AuthNavigation.kt rename to app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/auth/AuthNavigation.kt index 699a1f680..91f2ac683 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/feature/auth/AuthNavigation.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/auth/AuthNavigation.kt @@ -1,14 +1,14 @@ -package com.x8bit.bitwarden.ui.feature.auth +package com.x8bit.bitwarden.ui.auth.feature.auth import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder import androidx.navigation.NavHostController import androidx.navigation.NavOptions import androidx.navigation.navigation -import com.x8bit.bitwarden.ui.feature.createaccount.createAccountDestinations -import com.x8bit.bitwarden.ui.feature.createaccount.navigateToCreateAccount -import com.x8bit.bitwarden.ui.feature.landing.LANDING_ROUTE -import com.x8bit.bitwarden.ui.feature.landing.landingDestination +import com.x8bit.bitwarden.ui.auth.feature.createaccount.createAccountDestinations +import com.x8bit.bitwarden.ui.auth.feature.createaccount.navigateToCreateAccount +import com.x8bit.bitwarden.ui.auth.feature.landing.LANDING_ROUTE +import com.x8bit.bitwarden.ui.auth.feature.landing.landingDestination const val AUTH_ROUTE: String = "auth" diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/feature/createaccount/CreateAccountNavigation.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountNavigation.kt similarity index 91% rename from app/src/main/java/com/x8bit/bitwarden/ui/feature/createaccount/CreateAccountNavigation.kt rename to app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountNavigation.kt index b8fcfe1f5..d688678dd 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/feature/createaccount/CreateAccountNavigation.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountNavigation.kt @@ -1,4 +1,4 @@ -package com.x8bit.bitwarden.ui.feature.createaccount +package com.x8bit.bitwarden.ui.auth.feature.createaccount import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/feature/createaccount/CreateAccountScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountScreen.kt similarity index 93% rename from app/src/main/java/com/x8bit/bitwarden/ui/feature/createaccount/CreateAccountScreen.kt rename to app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountScreen.kt index ffacf1602..b8e27cdb5 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/feature/createaccount/CreateAccountScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountScreen.kt @@ -1,4 +1,4 @@ -package com.x8bit.bitwarden.ui.feature.createaccount +package com.x8bit.bitwarden.ui.auth.feature.createaccount import android.widget.Toast import androidx.compose.foundation.background @@ -19,8 +19,8 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import androidx.lifecycle.viewmodel.compose.viewModel import com.x8bit.bitwarden.R -import com.x8bit.bitwarden.ui.base.util.EventsEffect -import com.x8bit.bitwarden.ui.components.BitwardenTextField +import com.x8bit.bitwarden.ui.platform.base.util.EventsEffect +import com.x8bit.bitwarden.ui.platform.components.BitwardenTextField /** * Top level composable for the create account screen. diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/feature/createaccount/CreateAccountViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountViewModel.kt similarity index 90% rename from app/src/main/java/com/x8bit/bitwarden/ui/feature/createaccount/CreateAccountViewModel.kt rename to app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountViewModel.kt index 3724ef53a..5e2c32f61 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/feature/createaccount/CreateAccountViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountViewModel.kt @@ -1,6 +1,6 @@ -package com.x8bit.bitwarden.ui.feature.createaccount +package com.x8bit.bitwarden.ui.auth.feature.createaccount -import com.x8bit.bitwarden.ui.base.BaseViewModel +import com.x8bit.bitwarden.ui.platform.base.BaseViewModel import dagger.hilt.android.lifecycle.HiltViewModel import javax.inject.Inject diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/feature/landing/LandingNavigation.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingNavigation.kt similarity index 92% rename from app/src/main/java/com/x8bit/bitwarden/ui/feature/landing/LandingNavigation.kt rename to app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingNavigation.kt index dfab35a77..8e1a1bdc8 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/feature/landing/LandingNavigation.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingNavigation.kt @@ -1,4 +1,4 @@ -package com.x8bit.bitwarden.ui.feature.landing +package com.x8bit.bitwarden.ui.auth.feature.landing import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/feature/landing/LandingScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingScreen.kt similarity index 96% rename from app/src/main/java/com/x8bit/bitwarden/ui/feature/landing/LandingScreen.kt rename to app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingScreen.kt index 42ed1a915..9486f6610 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/feature/landing/LandingScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingScreen.kt @@ -1,4 +1,4 @@ -package com.x8bit.bitwarden.ui.feature.landing +package com.x8bit.bitwarden.ui.auth.feature.landing import androidx.compose.foundation.Image import androidx.compose.foundation.background @@ -24,8 +24,8 @@ import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.viewmodel.compose.viewModel import com.x8bit.bitwarden.R -import com.x8bit.bitwarden.ui.base.util.EventsEffect -import com.x8bit.bitwarden.ui.components.BitwardenTextField +import com.x8bit.bitwarden.ui.platform.base.util.EventsEffect +import com.x8bit.bitwarden.ui.platform.components.BitwardenTextField /** * The top level composable for the Landing screen. diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/feature/landing/LandingViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingViewModel.kt similarity index 95% rename from app/src/main/java/com/x8bit/bitwarden/ui/feature/landing/LandingViewModel.kt rename to app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingViewModel.kt index 509fccaf3..1aa8230d4 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/feature/landing/LandingViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingViewModel.kt @@ -1,6 +1,6 @@ -package com.x8bit.bitwarden.ui.feature.landing +package com.x8bit.bitwarden.ui.auth.feature.landing -import com.x8bit.bitwarden.ui.base.BaseViewModel +import com.x8bit.bitwarden.ui.platform.base.BaseViewModel import dagger.hilt.android.lifecycle.HiltViewModel import javax.inject.Inject diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/base/BaseViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/base/BaseViewModel.kt similarity index 98% rename from app/src/main/java/com/x8bit/bitwarden/ui/base/BaseViewModel.kt rename to app/src/main/java/com/x8bit/bitwarden/ui/platform/base/BaseViewModel.kt index 33d050e42..d1c272d11 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/base/BaseViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/base/BaseViewModel.kt @@ -1,4 +1,4 @@ -package com.x8bit.bitwarden.ui.base +package com.x8bit.bitwarden.ui.platform.base import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/base/util/EventsEffect.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/base/util/EventsEffect.kt similarity index 81% rename from app/src/main/java/com/x8bit/bitwarden/ui/base/util/EventsEffect.kt rename to app/src/main/java/com/x8bit/bitwarden/ui/platform/base/util/EventsEffect.kt index 436861396..4496ccb5a 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/base/util/EventsEffect.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/base/util/EventsEffect.kt @@ -1,8 +1,8 @@ -package com.x8bit.bitwarden.ui.base.util +package com.x8bit.bitwarden.ui.platform.base.util import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect -import com.x8bit.bitwarden.ui.base.BaseViewModel +import com.x8bit.bitwarden.ui.platform.base.BaseViewModel import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/components/BitwardenTextField.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/BitwardenTextField.kt similarity index 96% rename from app/src/main/java/com/x8bit/bitwarden/ui/components/BitwardenTextField.kt rename to app/src/main/java/com/x8bit/bitwarden/ui/platform/components/BitwardenTextField.kt index 8662a4abc..337545324 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/components/BitwardenTextField.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/BitwardenTextField.kt @@ -1,4 +1,4 @@ -package com.x8bit.bitwarden.ui.components +package com.x8bit.bitwarden.ui.platform.components import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/components/PlaceholderComposable.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/PlaceholderComposable.kt similarity index 93% rename from app/src/main/java/com/x8bit/bitwarden/ui/components/PlaceholderComposable.kt rename to app/src/main/java/com/x8bit/bitwarden/ui/platform/components/PlaceholderComposable.kt index 10da6da6c..357b26b3f 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/components/PlaceholderComposable.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/PlaceholderComposable.kt @@ -1,4 +1,4 @@ -package com.x8bit.bitwarden.ui.components +package com.x8bit.bitwarden.ui.platform.components import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/feature/rootnav/RootNavScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/rootnav/RootNavScreen.kt similarity index 89% rename from app/src/main/java/com/x8bit/bitwarden/ui/feature/rootnav/RootNavScreen.kt rename to app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/rootnav/RootNavScreen.kt index bdecc8b89..e9c176d39 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/feature/rootnav/RootNavScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/rootnav/RootNavScreen.kt @@ -1,4 +1,4 @@ -package com.x8bit.bitwarden.ui.feature.rootnav +package com.x8bit.bitwarden.ui.platform.feature.rootnav import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -11,9 +11,9 @@ import androidx.navigation.compose.NavHost import androidx.navigation.compose.composable import androidx.navigation.compose.rememberNavController import androidx.navigation.navOptions -import com.x8bit.bitwarden.ui.components.PlaceholderComposable -import com.x8bit.bitwarden.ui.feature.auth.authDestinations -import com.x8bit.bitwarden.ui.feature.auth.navigateToAuth +import com.x8bit.bitwarden.ui.auth.feature.auth.authDestinations +import com.x8bit.bitwarden.ui.auth.feature.auth.navigateToAuth +import com.x8bit.bitwarden.ui.platform.components.PlaceholderComposable /** * Controls root level [NavHost] for the app. diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/feature/rootnav/RootNavViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/rootnav/RootNavViewModel.kt similarity index 88% rename from app/src/main/java/com/x8bit/bitwarden/ui/feature/rootnav/RootNavViewModel.kt rename to app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/rootnav/RootNavViewModel.kt index 34bd4ca0f..70a4ecc4c 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/feature/rootnav/RootNavViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/rootnav/RootNavViewModel.kt @@ -1,7 +1,7 @@ -package com.x8bit.bitwarden.ui.feature.rootnav +package com.x8bit.bitwarden.ui.platform.feature.rootnav import androidx.lifecycle.viewModelScope -import com.x8bit.bitwarden.ui.base.BaseViewModel +import com.x8bit.bitwarden.ui.platform.base.BaseViewModel import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.delay import kotlinx.coroutines.launch diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/theme/Theme.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/Theme.kt similarity index 98% rename from app/src/main/java/com/x8bit/bitwarden/ui/theme/Theme.kt rename to app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/Theme.kt index 2956c2fc3..a60e36476 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/theme/Theme.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/Theme.kt @@ -1,4 +1,4 @@ -package com.x8bit.bitwarden.ui.theme +package com.x8bit.bitwarden.ui.platform.theme import android.app.Activity import android.content.Context diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/theme/Type.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/Type.kt similarity index 90% rename from app/src/main/java/com/x8bit/bitwarden/ui/theme/Type.kt rename to app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/Type.kt index fb0c365f5..255618fc2 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/theme/Type.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/Type.kt @@ -1,4 +1,4 @@ -package com.x8bit.bitwarden.ui.theme +package com.x8bit.bitwarden.ui.platform.theme import androidx.compose.material3.Typography import androidx.compose.ui.text.TextStyle diff --git a/app/src/test/java/com/x8bit/bitwarden/example/ResultCallAdapterTest.kt b/app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/network/core/ResultCallAdapterTest.kt similarity index 92% rename from app/src/test/java/com/x8bit/bitwarden/example/ResultCallAdapterTest.kt rename to app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/network/core/ResultCallAdapterTest.kt index f9e34fa4a..0a4b9af3e 100644 --- a/app/src/test/java/com/x8bit/bitwarden/example/ResultCallAdapterTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/network/core/ResultCallAdapterTest.kt @@ -1,6 +1,5 @@ -package com.x8bit.bitwarden.example +package com.x8bit.bitwarden.data.platform.datasource.network.core -import com.x8bit.bitwarden.data.datasource.network.ResultCallAdapterFactory import kotlinx.coroutines.runBlocking import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockWebServer diff --git a/app/src/test/java/com/x8bit/bitwarden/example/ui/feature/createaccount/CreateAccountScreenTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountScreenTest.kt similarity index 69% rename from app/src/test/java/com/x8bit/bitwarden/example/ui/feature/createaccount/CreateAccountScreenTest.kt rename to app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountScreenTest.kt index fbd98766e..8653df0a7 100644 --- a/app/src/test/java/com/x8bit/bitwarden/example/ui/feature/createaccount/CreateAccountScreenTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountScreenTest.kt @@ -1,11 +1,11 @@ -package com.x8bit.bitwarden.example.ui.feature.createaccount +package com.x8bit.bitwarden.ui.auth.feature.createaccount import androidx.compose.ui.test.onNodeWithText import androidx.compose.ui.test.performClick -import com.x8bit.bitwarden.example.ui.BaseComposeTest -import com.x8bit.bitwarden.ui.feature.createaccount.CreateAccountAction -import com.x8bit.bitwarden.ui.feature.createaccount.CreateAccountScreen -import com.x8bit.bitwarden.ui.feature.createaccount.CreateAccountViewModel +import com.x8bit.bitwarden.ui.platform.base.BaseComposeTest +import com.x8bit.bitwarden.ui.auth.feature.createaccount.CreateAccountAction +import com.x8bit.bitwarden.ui.auth.feature.createaccount.CreateAccountScreen +import com.x8bit.bitwarden.ui.auth.feature.createaccount.CreateAccountViewModel import io.mockk.every import io.mockk.mockk import io.mockk.verify diff --git a/app/src/test/java/com/x8bit/bitwarden/example/ui/feature/createaccount/CreateAccountViewModelTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountViewModelTest.kt similarity index 57% rename from app/src/test/java/com/x8bit/bitwarden/example/ui/feature/createaccount/CreateAccountViewModelTest.kt rename to app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountViewModelTest.kt index 314265359..f041ba610 100644 --- a/app/src/test/java/com/x8bit/bitwarden/example/ui/feature/createaccount/CreateAccountViewModelTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountViewModelTest.kt @@ -1,10 +1,10 @@ -package com.x8bit.bitwarden.example.ui.feature.createaccount +package com.x8bit.bitwarden.ui.auth.feature.createaccount import app.cash.turbine.test -import com.x8bit.bitwarden.example.ui.BaseViewModelTest -import com.x8bit.bitwarden.ui.feature.createaccount.CreateAccountAction -import com.x8bit.bitwarden.ui.feature.createaccount.CreateAccountEvent -import com.x8bit.bitwarden.ui.feature.createaccount.CreateAccountViewModel +import com.x8bit.bitwarden.ui.platform.base.BaseViewModelTest +import com.x8bit.bitwarden.ui.auth.feature.createaccount.CreateAccountAction +import com.x8bit.bitwarden.ui.auth.feature.createaccount.CreateAccountEvent +import com.x8bit.bitwarden.ui.auth.feature.createaccount.CreateAccountViewModel import kotlinx.coroutines.test.runTest import org.junit.jupiter.api.Test diff --git a/app/src/test/java/com/x8bit/bitwarden/example/ui/feature/landing/LandingScreenTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingScreenTest.kt similarity index 76% rename from app/src/test/java/com/x8bit/bitwarden/example/ui/feature/landing/LandingScreenTest.kt rename to app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingScreenTest.kt index 0e0dec316..0236ed54d 100644 --- a/app/src/test/java/com/x8bit/bitwarden/example/ui/feature/landing/LandingScreenTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingScreenTest.kt @@ -1,12 +1,12 @@ -package com.x8bit.bitwarden.example.ui.feature.landing +package com.x8bit.bitwarden.ui.auth.feature.landing import androidx.compose.ui.test.onNodeWithTag import androidx.compose.ui.test.performClick -import com.x8bit.bitwarden.example.ui.BaseComposeTest -import com.x8bit.bitwarden.ui.feature.landing.LandingAction -import com.x8bit.bitwarden.ui.feature.landing.LandingScreen -import com.x8bit.bitwarden.ui.feature.landing.LandingState -import com.x8bit.bitwarden.ui.feature.landing.LandingViewModel +import com.x8bit.bitwarden.ui.auth.feature.landing.LandingAction +import com.x8bit.bitwarden.ui.auth.feature.landing.LandingScreen +import com.x8bit.bitwarden.ui.auth.feature.landing.LandingState +import com.x8bit.bitwarden.ui.auth.feature.landing.LandingViewModel +import com.x8bit.bitwarden.ui.platform.base.BaseComposeTest import io.mockk.every import io.mockk.mockk import io.mockk.verify diff --git a/app/src/test/java/com/x8bit/bitwarden/example/ui/feature/landing/LandingViewModelTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingViewModelTest.kt similarity index 81% rename from app/src/test/java/com/x8bit/bitwarden/example/ui/feature/landing/LandingViewModelTest.kt rename to app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingViewModelTest.kt index 1859deff3..f81cd249d 100644 --- a/app/src/test/java/com/x8bit/bitwarden/example/ui/feature/landing/LandingViewModelTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingViewModelTest.kt @@ -1,11 +1,11 @@ -package com.x8bit.bitwarden.example.ui.feature.landing +package com.x8bit.bitwarden.ui.auth.feature.landing import app.cash.turbine.test -import com.x8bit.bitwarden.example.ui.BaseViewModelTest -import com.x8bit.bitwarden.ui.feature.landing.LandingAction -import com.x8bit.bitwarden.ui.feature.landing.LandingEvent -import com.x8bit.bitwarden.ui.feature.landing.LandingState -import com.x8bit.bitwarden.ui.feature.landing.LandingViewModel +import com.x8bit.bitwarden.ui.auth.feature.landing.LandingAction +import com.x8bit.bitwarden.ui.auth.feature.landing.LandingEvent +import com.x8bit.bitwarden.ui.auth.feature.landing.LandingState +import com.x8bit.bitwarden.ui.auth.feature.landing.LandingViewModel +import com.x8bit.bitwarden.ui.platform.base.BaseViewModelTest import kotlinx.coroutines.test.runTest import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test diff --git a/app/src/test/java/com/x8bit/bitwarden/example/ui/BaseComposeTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/platform/base/BaseComposeTest.kt similarity index 93% rename from app/src/test/java/com/x8bit/bitwarden/example/ui/BaseComposeTest.kt rename to app/src/test/java/com/x8bit/bitwarden/ui/platform/base/BaseComposeTest.kt index 9f4e9a068..68cce0d75 100644 --- a/app/src/test/java/com/x8bit/bitwarden/example/ui/BaseComposeTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/platform/base/BaseComposeTest.kt @@ -1,4 +1,4 @@ -package com.x8bit.bitwarden.example.ui +package com.x8bit.bitwarden.ui.platform.base import androidx.compose.ui.test.junit4.createComposeRule import dagger.hilt.android.testing.HiltTestApplication diff --git a/app/src/test/java/com/x8bit/bitwarden/example/ui/BaseViewModelTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/platform/base/BaseViewModelTest.kt similarity index 66% rename from app/src/test/java/com/x8bit/bitwarden/example/ui/BaseViewModelTest.kt rename to app/src/test/java/com/x8bit/bitwarden/ui/platform/base/BaseViewModelTest.kt index 1c8ba612a..163166ede 100644 --- a/app/src/test/java/com/x8bit/bitwarden/example/ui/BaseViewModelTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/platform/base/BaseViewModelTest.kt @@ -1,6 +1,5 @@ -package com.x8bit.bitwarden.example.ui +package com.x8bit.bitwarden.ui.platform.base -import com.x8bit.bitwarden.example.MainDispatcherExtension import org.junit.jupiter.api.extension.RegisterExtension abstract class BaseViewModelTest { diff --git a/app/src/test/java/com/x8bit/bitwarden/example/MainDispatcherExtension.kt b/app/src/test/java/com/x8bit/bitwarden/ui/platform/base/MainDispatcherExtension.kt similarity index 91% rename from app/src/test/java/com/x8bit/bitwarden/example/MainDispatcherExtension.kt rename to app/src/test/java/com/x8bit/bitwarden/ui/platform/base/MainDispatcherExtension.kt index b92f25d90..8bab0aafe 100644 --- a/app/src/test/java/com/x8bit/bitwarden/example/MainDispatcherExtension.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/platform/base/MainDispatcherExtension.kt @@ -1,4 +1,4 @@ -package com.x8bit.bitwarden.example +package com.x8bit.bitwarden.ui.platform.base import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ExperimentalCoroutinesApi @@ -10,9 +10,7 @@ import org.junit.jupiter.api.extension.AfterAllCallback import org.junit.jupiter.api.extension.AfterEachCallback import org.junit.jupiter.api.extension.BeforeAllCallback import org.junit.jupiter.api.extension.BeforeEachCallback -import org.junit.jupiter.api.extension.ExtendWith import org.junit.jupiter.api.extension.ExtensionContext -import org.junit.jupiter.api.extension.RegisterExtension /** * JUnit 5 Extension for automatically setting a [testDispatcher] as the "main" dispatcher. diff --git a/app/src/test/java/com/x8bit/bitwarden/example/ui/feature/rootnav/RootNavViewModelTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/rootnav/RootNavViewModelTest.kt similarity index 72% rename from app/src/test/java/com/x8bit/bitwarden/example/ui/feature/rootnav/RootNavViewModelTest.kt rename to app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/rootnav/RootNavViewModelTest.kt index 46206de0b..58a92407d 100644 --- a/app/src/test/java/com/x8bit/bitwarden/example/ui/feature/rootnav/RootNavViewModelTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/rootnav/RootNavViewModelTest.kt @@ -1,9 +1,7 @@ -package com.x8bit.bitwarden.example.ui.feature.rootnav +package com.x8bit.bitwarden.ui.platform.feature.rootnav import app.cash.turbine.test -import com.x8bit.bitwarden.example.ui.BaseViewModelTest -import com.x8bit.bitwarden.ui.feature.rootnav.RootNavState -import com.x8bit.bitwarden.ui.feature.rootnav.RootNavViewModel +import com.x8bit.bitwarden.ui.platform.base.BaseViewModelTest import kotlinx.coroutines.test.runTest import org.junit.jupiter.api.Test