[PR #4992] [MERGED] [PM-19870] Migrate ServerConfig and ConfigDiskSource to the data module #5381

Closed
opened 2025-11-26 23:59:03 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/4992
Author: @SaintPatrck
Created: 4/3/2025
Status: Merged
Merged: 4/4/2025
Merged by: @SaintPatrck

Base: mainHead: data-module/config-disk-source


📝 Commits (1)

  • 3c53fd9 [PM-19870] Migrate ServerConfig and ConfigDiskSource to the data module

📊 Changes

51 files changed (+88 additions, -388 deletions)

View changed files

📝 app/build.gradle.kts (+1 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt (+1 -1)
📝 app/src/main/java/com/x8bit/bitwarden/data/auth/repository/di/AuthRepositoryModule.kt (+1 -1)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/di/PlatformDiskModule.kt (+2 -2)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/manager/FeatureFlagManagerImpl.kt (+1 -1)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/repository/ServerConfigRepository.kt (+1 -1)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/repository/ServerConfigRepositoryImpl.kt (+2 -2)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/repository/di/PlatformRepositoryModule.kt (+1 -1)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/util/ServerVersionUtils.kt (+1 -3)
📝 app/src/test/java/com/x8bit/bitwarden/data/auth/datasource/disk/AuthDiskSourceTest.kt (+1 -1)
📝 app/src/test/java/com/x8bit/bitwarden/data/auth/datasource/disk/legacy/LegacySecureStorageMigratorTest.kt (+1 -1)
📝 app/src/test/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt (+2 -2)
📝 app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/disk/EnvironmentDiskSourceTest.kt (+1 -1)
📝 app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/disk/FeatureFlagOverrideDiskSourceTest.kt (+1 -1)
📝 app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/disk/PushDiskSourceTest.kt (+1 -1)
📝 app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/disk/SettingsDiskSourceTest.kt (+1 -1)
📝 app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/disk/legacy/LegacyAppCenterMigratorTest.kt (+1 -1)
📝 app/src/test/java/com/x8bit/bitwarden/data/platform/manager/FeatureFlagManagerTest.kt (+1 -1)
📝 app/src/test/java/com/x8bit/bitwarden/data/platform/manager/PushManagerTest.kt (+1 -1)
📝 app/src/test/java/com/x8bit/bitwarden/data/platform/repository/DebugMenuRepositoryTest.kt (+1 -1)

...and 31 more files

📄 Description

🎟️ Tracking

PM-19870

📔 Objective

This commit migrates the ServerConfig data class and ConfigDiskSource from the app and authenticator modules to the data module.

The following changes were made:

  • Deleted ServerConfig.kt and ConfigDiskSource.kt in the app and authenticator modules.
  • Created ServerConfig.kt, ConfigDiskSource.kt, ConfigDiskSourceImpl.kt, FakeConfigDiskSource.kt and FakeSharedPreferences.kt files in the data module.
  • Updated the dependency in build.gradle.kts file in the data module.
  • Moved and updated related test classes.
  • Updated imports and usages of ServerConfig and ConfigDiskSource across app and authenticator modules to point to the new location in the data module.
  • Added test fixtures to the data module.

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/4992 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 4/3/2025 **Status:** ✅ Merged **Merged:** 4/4/2025 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `data-module/config-disk-source` --- ### 📝 Commits (1) - [`3c53fd9`](https://github.com/bitwarden/android/commit/3c53fd978f79ceabf33232fdb7d1126250d3922d) [PM-19870] Migrate ServerConfig and ConfigDiskSource to the `data` module ### 📊 Changes **51 files changed** (+88 additions, -388 deletions) <details> <summary>View changed files</summary> 📝 `app/build.gradle.kts` (+1 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt` (+1 -1) 📝 `app/src/main/java/com/x8bit/bitwarden/data/auth/repository/di/AuthRepositoryModule.kt` (+1 -1) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/di/PlatformDiskModule.kt` (+2 -2) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/manager/FeatureFlagManagerImpl.kt` (+1 -1) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/repository/ServerConfigRepository.kt` (+1 -1) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/repository/ServerConfigRepositoryImpl.kt` (+2 -2) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/repository/di/PlatformRepositoryModule.kt` (+1 -1) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/util/ServerVersionUtils.kt` (+1 -3) 📝 `app/src/test/java/com/x8bit/bitwarden/data/auth/datasource/disk/AuthDiskSourceTest.kt` (+1 -1) 📝 `app/src/test/java/com/x8bit/bitwarden/data/auth/datasource/disk/legacy/LegacySecureStorageMigratorTest.kt` (+1 -1) 📝 `app/src/test/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt` (+2 -2) 📝 `app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/disk/EnvironmentDiskSourceTest.kt` (+1 -1) 📝 `app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/disk/FeatureFlagOverrideDiskSourceTest.kt` (+1 -1) 📝 `app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/disk/PushDiskSourceTest.kt` (+1 -1) 📝 `app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/disk/SettingsDiskSourceTest.kt` (+1 -1) 📝 `app/src/test/java/com/x8bit/bitwarden/data/platform/datasource/disk/legacy/LegacyAppCenterMigratorTest.kt` (+1 -1) 📝 `app/src/test/java/com/x8bit/bitwarden/data/platform/manager/FeatureFlagManagerTest.kt` (+1 -1) 📝 `app/src/test/java/com/x8bit/bitwarden/data/platform/manager/PushManagerTest.kt` (+1 -1) 📝 `app/src/test/java/com/x8bit/bitwarden/data/platform/repository/DebugMenuRepositoryTest.kt` (+1 -1) _...and 31 more files_ </details> ### 📄 Description ## 🎟️ Tracking PM-19870 ## 📔 Objective This commit migrates the `ServerConfig` data class and `ConfigDiskSource` from the `app` and `authenticator` modules to the `data` module. The following changes were made: - Deleted `ServerConfig.kt` and `ConfigDiskSource.kt` in the `app` and `authenticator` modules. - Created `ServerConfig.kt`, `ConfigDiskSource.kt`, `ConfigDiskSourceImpl.kt`, `FakeConfigDiskSource.kt` and `FakeSharedPreferences.kt` files in the `data` module. - Updated the dependency in build.gradle.kts file in the `data` module. - Moved and updated related test classes. - Updated imports and usages of `ServerConfig` and `ConfigDiskSource` across `app` and `authenticator` modules to point to the new location in the `data` module. - Added test fixtures to the `data` module. ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:59:03 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#5381