chore(ui): migrate hiltViewModel to its new androidx.hilt.lifecycle.viewmodel.compose package #236

Closed
opened 2026-07-03 16:53:11 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-07-03 16:53:11 +00:00 (Migrated from github.com)

Clear the 'hiltViewModel(…)' is deprecated. Moved to package: androidx.hilt.lifecycle.viewmodel.compose. compile warnings (18 sites across the ui/** files), surfaced by the Gradle-warnings investigation.

Safe import swap — no dependency change. The old androidx.hilt.navigation.compose.hiltViewModel inline-delegates to the new androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel, and the new artifact (androidx.hilt:hilt-lifecycle-viewmodel-compose) is already transitively on the compile classpath via the pinned hilt-navigation-compose:1.3.0. Identical signatures → behaviour byte-for-byte identical.

Fix: in each affected file, swap import androidx.hilt.navigation.compose.hiltViewModel → import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel (ktlint reorders). Call sites (including the store-owner overload) are unchanged. Re-run preflight.

Clear the `'hiltViewModel(…)' is deprecated. Moved to package: androidx.hilt.lifecycle.viewmodel.compose.` compile warnings (18 sites across the `ui/**` files), surfaced by the Gradle-warnings investigation. **Safe import swap — no dependency change.** The old `androidx.hilt.navigation.compose.hiltViewModel` `inline`-delegates to the new `androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel`, and the new artifact (`androidx.hilt:hilt-lifecycle-viewmodel-compose`) is already transitively on the compile classpath via the pinned `hilt-navigation-compose:1.3.0`. Identical signatures → behaviour byte-for-byte identical. **Fix:** in each affected file, swap `import androidx.hilt.navigation.compose.hiltViewModel` → `import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel` (ktlint reorders). Call sites (including the store-owner overload) are unchanged. Re-run preflight.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#236