Bot releases are hidden (Show)
Published by elihart 11 months ago
Fixing #699 java.lang.SecurityException from mock printer (#700)
Published by elihart about 1 year ago
Update dependencies to fix lifecycle inheritance (#689)
Published by elihart about 2 years ago
mvrx-common
module with new abstraction MavericksRepository
that behaves exactly like MavericksViewModel
except it doesn't have any Android dependencies and can be used in pure Kotlin modules (#635)MavericksViewModelConfig.BlockExecutions
is extracted into top level class MavericksBlockExecutions
(#635)argsOrNull
to handle optional (nullable) fragment args (#639)sample-anvil
moduleSee more details in https://airbnb.io/mavericks/#/new-3x
Published by elihart over 2 years ago
Published by elihart over 2 years ago
Expose state restoration functions (https://github.com/airbnb/mavericks/pull/611)
Use passed scope as fragment if possible (https://github.com/airbnb/mavericks/pull/618)
Published by elihart over 2 years ago
Big thanks to @itsandreramon for contributing the two main improvements in this release!
Pre-configure Hilt by adding a new "mvrx-hilt" artifact (#598)
See the updated Hilt documentation for guidance on how to more easily use Hilt with Mavericks https://airbnb.io/mavericks/#/dagger?id=hilt
Add support to use Mavericks with JUnit 5 (#600)
See the new testing documentation at https://airbnb.io/mavericks/#/testing for details.
Don't expose lifecycleAwareLazy in viewModel return type (#603)
Published by elihart almost 3 years ago
Published by elihart almost 3 years ago
Published by elihart about 3 years ago
Published by elihart over 3 years ago
Note: Compose support is experimental and mvrx-compose artifact is at version 2.1.0-alpha02
Published by elihart over 3 years ago
Published by elihart over 3 years ago
mavericks-compose:2.1.0-alpha01
.
@RestrictTo
annotations in favor of just @InternalMavericksApi
. The Kotlin opt-in annotations work more reliably than the Android lint rules and there is no need for both.androidx-lifecycle
2.2.0 that would have required any unit tests that use Mavericks to also use robolectric.Published by elihart over 3 years ago
Mavericks 2.0 is a ground up rewrite for coroutines. Check out the documentation for 2.0 to find out what is new and how to upgrade.
mvrx
artifact names are now mavericks
.mavericks-rxjava2
to maintain backwards compatibility. New Mavericks users who just use coroutines can just use mavericks
.postInvalidate()
from onStart in your base Fragment classviewModelScope
and onCleared()
still exist to match the existing APIwithState {
// W1
withState {
// W2
}
setState {
// S1
setState {
// S2
setState {
// S3
}
}
}
}
Previously, setState would only be prioritized at that nesting level so it would run:
[W1, S1, W2, S2, S3]
Now, it will run:
[W1, S1, S2, S3, W2]
navGraphViewModel(R.id.my_graph)
(#443)Published by elihart almost 4 years ago
Make MavericksViewModel extension functions protected (#488)
Add MavericksViewModel.awaitState (#487) to access current ViewModel state via a suspend function
Mark all @RestrictTo APIs with @InternalMavericksApi (#480)
Api additions to the mocking framework (#475) (#477)
Migrated CoroutinesStateStore to SharedFlow (#469)
Launcher and mock speed optimizations (#468)
Published by elihart almost 4 years ago
Coroutine api tweaks (#464)
Fix mocking docs (#465)
Never complete ViewModel.stateFlow (#460)
Tweaks and additions to the mocking framework (#461)
Allow configurable StateStore CoroutineContext (#454)
[2.0] Cleaned up and obfuscated some @RestrictTo APIs (#453)
MockableMavericks.initialize
function signature has changedPublished by elihart about 4 years ago
mvrx
artifact no longer has a dependency on RxJava, and the ViewModel and StateStore are now implemented with Kotlin Coroutinesmvrx-rxjava2
artifactmvrx-mocking
artifact now provides built in support for mocking viewmodels, states, and full screenswithState {
// W1
withState {
// W2
}
setState {
// S1
setState {
// S2
setState {
// S3
}
}
}
}
Previously, setState would only be prioritized at that nesting level so it would run:
[W1, S1, W2, S2, S3]
Now, it will run:
[W1, S1, S2, S3, W2]
postInvalidate()
from onStart in your base Fragment class.Published by elihart over 4 years ago
Published by elihart over 4 years ago
Note: MvRx now targets 1.8 for Java/Kotlin, so you may need to update your projects to also target
1.8
android {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}