Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to ViewModel support to use the new CreationExtras. #3461

Closed
wants to merge 1 commit into from

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Jul 11, 2022

Updates to ViewModel support to use the new CreationExtras.

  • Fixes issues with keyed ViewModels.
  • Fixes issues with using the ViewModel factory with a navigation entry as owner. Now the lazy function hiltNavGraphViewModels() provided by androidx.hilt:hilt-navigation-fragment is no longer needed.
  • Updates deps on fragment to 1.5.0 and lifecycle to 2.5.0
    • That required updating the Android SDK to 31+, so upgrading to 32 and tools to 32.0.0 (besides a bazel example which has issues with that)
    • This requires AGP 7.0.0 so dropping support for AGP 4.2.0
    • AGP 7.0.0 requires Java 11 so dropping support for Java 8
    • Targeting 31+ requires updating androidx.text.core to 1.4.0

Fixes #3232.
Issue #2152.

RELNOTES=Fixes #3232 and #2152 (without hiltNavGraphViewModels). Also, due to the update to the new fragment 1.5.0 version, requires apps using Hilt to use SDK 31+ for the compile SDK.

@copybara-service copybara-service bot force-pushed the test_449844449 branch 19 times, most recently from 0283495 to 5368957 Compare July 14, 2022 22:23
- Fixes issues with keyed ViewModels.
- Fixes issues with using the ViewModel factory with a navigation entry as owner. Now the lazy function hiltNavGraphViewModels() provided by androidx.hilt:hilt-navigation-fragment is no longer needed.
- Updates deps on fragment to 1.5.0 and lifecycle to 2.5.0
  - That required updating the Android SDK to 31+, so upgrading to 32 and tools to 32.0.0 (besides a bazel example which has issues with that)
  - This requires AGP 7.0.0 so dropping support for AGP 4.2.0
  - AGP 7.0.0 requires Java 11 so dropping support for Java 8
  - Targeting 31+ requires updating androidx.text.core to 1.4.0

Fixes #3232.
Issue #2152.

RELNOTES=Fixes #3232 and #2152 (without hiltNavGraphViewModels). Also, due to the update to the new fragment 1.5.0 version, requires apps using Hilt to use SDK 31+ for the compile SDK.
PiperOrigin-RevId: 449844449
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Caused by java.lang.IllegalArgumentException: SavedStateProvider with the given key is already registered
1 participant