4.2.1 - 2024-05-17
- Adds BrowserHashNavigationInterceptorandBrowserHistoryNavigationInterceptortowasmJstarget
4.2.0 - 2024-05-09
- Increased Kotlin version to 1.9.23
- Increased Compose version to 1.6.1
- Updated other libraries to latest versions:
- Kotlinx.Coroutines -> 1.8.1
- Kotlinx.Serialization -> 1.6.3
- Ktor -> 2.3.11
 
- Added experimental WASM target, fixing Issue #54. Please note the
following limitations:
- Only wasmJsis supported.wasmWasitarget is not currently supported due to lack of support from kotlinx.coroutines
- :ballast-debugger-clientdoes not support- wasmJs, because stable builds of Ktor Client don't support- wasmJsyet.
- :ballast-firebase-analyticsand- :ballast-firebase-crashlyticsdo not support any targets other than Android, thus these modules are not available on- wasmJs. However, the more generic version of those modules,- :ballast-analyticsand- :ballast-crash-reportingare supported on- wasmJs.
- All other Ballast modules do support wasmJstargets, including:ballast-navigation.
 
- Only 
- :ballast-navigationno longer depends on the- ktor-httplibrary. It was previously using this library for parsing URIs, but because that library includes a lot of extra stuff related to HTTP that wasn't needed in Ballast Navigation, it increased binary size considerably. URI parsing is now handled by eygraber/uri-kmp. This fixes Issue #35.
- [ballast-schedules]: Slight improvement for using Android WorkManager with BallastScheduler. A new method has been
added, SchedulerCallback.configureWorkRequest(), which allows you to configure theOneTimeWorkRequest.Builder. This can be used to apply constraints, mark the job as expedited, etc.
4.1.0 - 2024-02-12
- Updates to Kotlin 1.9.22
- Adds custom toString()implementations for many classes
- ballast-navigation: Adds override of- RoutingTable.fromEnumwhich accepts- EnumEntries<T>
- ballast-navigation: Adds override of- BallastViewModelConfiguration.Builder.withRouterwhich accepts a deepLink URL
- Adds ballast-schedulesmodule, for sending Inputs at regularly-scheduled intervals.
4.0.0 - 2023-09-05
- Updates to Kotlin 1.9.10
- The Debugger IntelliJ plugin now has functionality to send States and Inputs to connected ViewModels as JSON, which gets parsed and handled on the device.
- Several API improvements, including some breaking changes. See v4 Migration Guide for full list of changes and instructions for updating your project.
3.0.2 - 2023-06-08
- Fixes regression where awaitViewModelStart()never calls a terminal Flow operator and doesn't actually suspend.
3.0.1 - 2023-05-13
- Fixes regression in BallastSavedStateInterceptor
3.0.0 - 2023-05-07
- Updates to Kotlin 1.8.20
- Drops support for deprecated KMPP targets:
- JS Legacy
- iosArm32
 
- Several API improvements, including some breaking changes. See v3 Migration Guide for full list of changes and instructions for updating your project.
2.3.0 - 2022-11-28
- Adds new experimental ballast-navigationmodule for handling URL-based routing
- Breaks examples into their own projects, to focus on Ballast itself instead of bogging it down with the overhead of
multiplatform architecture.
- examples/android uses Ballast purely within the older MVC-style Views, showing how the MVI pattern is not limited to Compose or declarative UI toolkits
- examples/desktop uses Ballast in a Compose Desktop application with Material UI. Most of what's in here could be directly translated into Android Compose with Material UI
- examples/web uses Ballast in a Compose/Web (DOM) application. In particular, it uses the hash-based Router interceptor, and is what is embedded into the documentation site
 
2.2.0 - 2022-09-29
- Adds new experimental ballast-syncmodule for synchronizing ViewModel states. Out-of-the-box only in-memory synchronization is supported, but it is possible to write your own network adapter.
- Adds new experimental ballast-undomodule for adding State-based undo/redo functionality to any ViewModel.
- Fixed an issue where exceptions thrown by an Interceptor would crash the entire ViewModel without logging the
exception. Now, those exceptions are caught and sent to the BallastLoggeras aBallastNotification.UnhandledError.
2.1.0 - 2022-09-29
- Restores the Debugger UI in the Ballast Intellij Plugin
- Removed deprecated AndroidViewModel.attachEventHandler()version that should have been removed in 2.0.0, adds newAndroidViewModel.runOnLifecycle()to combine attaching an eventHandler and observing states with 1 method
2.0.1 - 2022-09-06
- Fixed issue publishing Intellij Plugin
2.0.0 - 2022-09-02
- Updates to Kotlin 1.7.10
- Updates Ktor to 2.1.0
- Updates other dependencies to latest versions
- Removes Debugger UI from IntelliJ plugin, so the that plugin can be republished without the Compose dependency, allowing the templating feature in the latest IntelliJ versions, at least
New/Updated Features
- Adds BootstrapInterceptorfor sending an Input when the ViewModel is created, instead of making the UI send the initial Input
- InputStrategyis now typed with the same type parameters as everything else in the- DefaultViewModelConfiguration
- Some configuration DSL methods are deprecated:
- builder.forViewModel()should be replaced with- builder.withViewModel().build()
- BallastRepositorynow takes- BallastViewModelConfigurationin its primary constructor instead of- BallastViewModelConfiguration.Builder. Use- builder.withRepository().build()instead of the old constructor.
 
- Adds a configuration callback to BallastSavedStateInterceptorto allow user-specified buffering/filtering on the States as they are sent to be saved
1.3.0 - 2022-08-16
- Update IntelliJ Plugin to support 2022.1.4. It still cannot support 2022.2 or higher because it's blocked by the Compose plugin that it depends on, which does not support 2022.2 yet.
1.2.1 - 2022-05-18
- Don't check for cleared in trySend (fixes #25)
- Improved KDoc documentation for all classes/functions in core module
1.2.0 - 2022-05-18
- Improvements to AndroidViewModel- Adds attachEventHandler()override which runs on aCoroutineScoperather than aLifecycle, which is better-suited for Compose EventHandlers
- Adds attachEventHandlerOnLifecycle()to be more explicit about when the eventHandler is running on a Lifecycle
- Original attachEventHandler()is now marked as deprecated, and should be replaced withattachEventHandlerOnLifecycle()
- Adds observeStatesOnLifecycle()method for more easily collecting states in XML-based Views
 
- Adds 
1.1.0 - 2022-04-29
- Many improvements to the Intellij plugin
- Allow Debugger to work with all 1.x.xclient versions
- The Debugger's port can now be changed in the Preferences dialog
- File templates are now provided to quickly generate components from the Right-click > Newmenu
- The values and errors show for inputs, events, states, and sideJobs in the debugger are now more nicely formatted
 
- Allow Debugger to work with all 
1.0.0 - 2022-04-19
- Ballast is now considered stable with its first 1.0.0 release!
- Adds Repository fetchWithCachefunction to observe a Flow rather than emit a one-shot data source
- Adopt Flow/Coroutine adapters from KaMPKit instead of using home-grown ones
0.15.1 - 2022-04-08
- Fix bug in IntelliJ plugin where settings were not being saved
- Removes "sample" from IntelliJ plugin, as that example and several more are available from the documentation site
0.15.0 - 2022-04-06
- Fix several bugs in Debugger UI
- Kotlin coroutines versions were in conflict and crashing the debugger
- Timestamps not correctly reported once ViewModel was refreshed
- Connection Ballast Version not reported correctly once refreshed
 
- Adds new ballast-saved-statemodule
- Adds ballast-testAPI for isolating a single input
- Reverts Coroutines version back to 1.5.2. To use Ballast on iOS with the new memory model, manually include the 1.6.0 dependency
0.14.0 - 2022-03-28
- Attempts to get iOS support working and documented, with M1 Simulator support
- Updates Coroutines to 1.6.0, for the Native's new memory model support
0.13.1 - 2022-03-25
- [BUG FIX] Fix regression in debugger, where you could not view or rollback to previous States.
0.13.0 - 2022-03-24
- [BREAKING CHANGE] Renames ballast-crashlyticsmodule toballast-firebase-crashlytics
- [BREAKING CHANGE] Renames sideEffect()tosideJob()to be more accurate and less confusing in comparison to other Kotlin MVI libraries.
- [BREAKING CHANGE] BallastViewModelno longer implements theSendChannelinterface, it exposes thesendandtrySendmethods directly. It also addssendAndAwaitCompletion()to send an Input and wait for it to completely finish processing.
- [BREAKING CHANGE] The loggerproperty ofBallastViewModelConfiguration.Builderis now a function, which receives the viewModel name when built, to pass as the tag of a logger.
- [BREAKING CHANGE] Moves annotations for Firebase into commonMain and renames them:
- @FirebaseCrashlyticsInterceptor.Ignore-->- @FirebaseCrashlyticsIgnore
- @FirebaseAnalyticsInterceptor.TrackInput-->- @FirebaseAnalyticsTrackInput
 
- [FUNCTIONAL CHANGE] SideJobs are now posted to the VM immediately, rather than collected and dispatched explicitly
after handling. The default implementation still requires that SideJobs are sent as the last statements of the
InputHandler, though.- By writing a custom InputStrategy.Guardian, you could remove the restriction that sideJobs must be started at the end of the Input. This is dangerous and you shouldn't do it unless you really know what you're doing.
 
- By writing a custom 
- [BUG FIX] Fixes issue where JS Debugger cannot connect because JS browser websocket clients can't send headers
- [NEW] Adds platform-specific BallastLoggerimplementations (AndroidBallastLogger,JsConsoleBallastLogger). The default logger ofBallastViewModelConfigurationis stillNoOpLogger().
0.12.0 - 2022-03-17
- Fixes issue with inputHandler { }andeventHandler { }functions, which previously didn't actually send the input or event to the lambda
- Move all InputHandler checks into the Guardian, so any/all of them could be thrown away by the end-user if needed
- make a dedicated InputStrategyScopeto match the pattern of all other pluggable features
0.11.0 - 2022-03-15
- Adds "time-travel debugging" to Debugger IntelliJ plugin! Inputs can now be re-sent, and you can roll back the VM state to any previous point in time
- Makes configuration a builder instead of multiple constructors
- Allow BallastViewModelImpl to access the host VM, so the user-created VM is what's sent to Interceptors
- ViewModels now clear themselves when their coroutine scope is closed, rather than having to do it manually
- Adds a basic Logging facade, so all Ballast components have easy access to a common logger
- Tighten up the overall API a bit, to be more streamlined
0.10.0 - 2022-02-28
- Updates to Kotlin 1.6.10
- Fixes issue running IntelliJ plugin on Windows
- Starts improving the Interceptor API to eventually allow Interceptors to inject Inputs and restore States
0.9.0 - 2022-02-28
- Finishes Debugger UI, fully exposing all states of Inputs, Events, and SideEffects
- Converts Debugger UI to an IntelliJ Plugin, instead of a standalone desktop application
- Adds a few new BallastNotifications, to notify of Inputs and Events being queued, but not yet processed
- Fixed bug where SideEffect errors and cancellation was not being notified properly
- SideEffectcopeis now also a- CoroutineScope, so you can- launchother coroutines directly within the- sideEffect(key) { }block without having to manually wrap it in- coroutineScope { }
0.8.2 - 2022-02-23
- Fix issue with creating desktop packages.
0.8.1 - 2022-02-23
- Fix issue with creating desktop packages.
0.8.0 - 2022-02-22
This is a major release, with lots of new features, greatly improved safety, but with several significant breaking changes, as descibed below:
- Improves side-effects
- They are now started through a Channel, instead of relying on a Mutex for safety
- New BallastInterceptormethods added to track sideEffect starts/errors
- SideEffects (and related APIs) now require a keyto be provided, to avoid accidental restarting cause by disparate Inputs forgetting to provide a key
 
- Improves safety of ParallelInputStrategyto prevent multiple updates, rather than just throwing an error at the end of the Input handler block if it was used incorrectly- Replaces onCompletedcallback with aGuardianinterface, which each InputStrategy can create for itself to check accesses during the InputHandler, rather than at the end
 
- Replaces 
- Rewrites Interceptor API
- Instead of an interface, interceptors "events" are sent as a sealed class, BallastNotification. These Notifications are sent to a SharedFlow inside the core ViewModel, and each Interceptor observes this SharedFlow from its own coroutine, launched in the viewModel coroutineScope
 
- Instead of an interface, interceptors "events" are sent as a sealed class, 
- Improves Repository CachedDSL:- Adds getValueOrThrow()
- Adds getCachedOrThrow()
 
- Adds 
- Introduces Ballast Debugger, a realtime desktop app for observing what is happening within your application's Ballast ViewModels
0.7.0 - 2022-02-14
- Adds Repository module for app-wide caching and communication
0.6.0 - 2022-01-27
- Improves DSL for restarting SideEffects
0.5.0 - 2022-01-16
- Fixes issue with input Channel buffer that didn't do exactly what I expected
0.4.0 - 2022-01-14
- Tweaks API a bit
- SideEffects must now be the last blocks called while handling an Input, to avoid confusion about dispatching the side effect but not actually running until the Input processing has completed
0.3.0 - 2022-01-06
0.1.0 - 2021-11-18
- Initial Commit