Skip to content

Releases: copper-leaf/ballast

5.1.0

Choose a tag to compare

@cjbrooks12 cjbrooks12 released this 10 Jun 03:15

What's New Since 5.0.1

New Modules

Server-side (all experimental)

Module Summary
ballast-ktor-server Ktor plugin to run Ballast ViewModels natively inside Ktor server applications
ballast-autoscale Wraps a pool of ViewModels and dynamically scales worker count based on load — suited for server-side job processing
ballast-queue-core Persistent background job queue with retries, backoff, cancellation, checkpointing, and stored results
ballast-queue-viewmodel ViewModel wrapper around the job queue for familiar Ballast code patterns
ballast-queue-exposed-driver PostgreSQL-backed queue driver using Jetbrains Exposed (MySQL experimental)

Scheduler (split out and expanded from ballast-schedules)

Module Summary
ballast-scheduler-core Core scheduler infrastructure, independent of Ballast MVI — coroutine delay and cron-like polling executors
ballast-scheduler-viewmodel Integrates scheduler with ViewModels via SchedulerInterceptor to dispatch inputs on a schedule
ballast-scheduler-cron Full cron expression support using OCPS syntax
ballast-scheduler-android-alarmmanager Android AlarmManager-based persistent scheduler for exact-timing tasks when the app is backgrounded

Utilities

Module Summary
ballast-kotlinx-serialization Registers KSerializers once per ViewModel config so all plugins (debugger, queue, etc.) share them

Deprecations

  • ballast-repository — Marked deprecated. The MVI repository pattern is being phased out as it turned out to be a failed experiment.
  • ballast-schedules — Marked deprecated. Superseded by the new ballast-scheduler-* family of modules.
  • KillSwitch interceptor — Deprecated. Graceful shutdown is now a first-class API on BallastViewModel via AutoCloseable (close()) and SideJobScope.

API Changes

  • BallastEncoder / BallastDecoder — New unified serialization interfaces on the ViewModel config. Previously each plugin had its own serialization logic; now they all share one. ballast-kotlinx-serialization provides the implementation.
  • ballast-navigation — Added pathFormat() helper for sharing route definitions between Ktor client and server.

Documentation

The entire documentation system was overhauled — docs moved from an SSG/Orchid website into plain Markdown files living alongside the code:

  • docs/ is the new home for all Ballast documentation
  • Each module now has its own README.md co-located with the source code
  • Old Orchid/MkDocs build system and all generated pages removed

5.0.1

Choose a tag to compare

@cjbrooks12 cjbrooks12 released this 16 Dec 03:15

5.0.1 - 2025-12-15

  • Replaced usages of kotlinx.datetime.Clock with kotlin.time.Clock
  • Replaced usages of kotlinx.datetime.Instant with kotlin.time.Instant
  • Ballast debugger client is now supported on WasmJS targets
  • Kotlin updated to 2.2.20.
  • Compose updated to 1.8.2.
  • kotlinx-serialization updated to 1.9.0.
  • kotlinx-datetime updated to 0.7.1.
  • ktor client updated to 3.3.0.

4.2.1

Choose a tag to compare

@github-actions github-actions released this 18 May 15:08
3b060f2
  • 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 wasmJs is supported. wasmWasi target is not currently supported due to lack of support from kotlinx.coroutines
    • :ballast-debugger-client does not support wasmJs, because stable builds of Ktor Client don't support wasmJs yet.
    • :ballast-firebase-analytics and :ballast-firebase-crashlytics do not support any targets other than Android, thus these modules are not available on wasmJs. However, the more generic version of those modules, :ballast-analytics and :ballast-crash-reporting are supported on wasmJs.
    • All other Ballast modules do support wasmJs targets, including :ballast-navigation.
    • BrowserHashNavigationInterceptor and BrowserHistoryNavigationInterceptor are also ported to the wasmJs target, but a shared sourceset between js and wasmJs is not available. it must be configured separately in each target.
  • :ballast-navigation no longer depends on the ktor-http library. 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 the OneTimeWorkRequest.Builder. This can be used to apply constraints, mark the job as expedited, etc.

4.2.0

Choose a tag to compare

@github-actions github-actions released this 16 May 16:42
  • 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 wasmJs is supported. wasmWasi target is not currently supported due to lack of support from kotlinx.coroutines
    • :ballast-debugger-client does not support wasmJs, because stable builds of Ktor Client don't support wasmJs yet.
    • :ballast-firebase-analytics and :ballast-firebase-crashlytics do not support any targets other than Android, thus these modules are not available on wasmJs. However, the more generic version of those modules, :ballast-analytics and :ballast-crash-reporting are supported on wasmJs.
    • All other Ballast modules do support wasmJs targets, including :ballast-navigation.
  • :ballast-navigation no longer depends on the ktor-http library. 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 the OneTimeWorkRequest.Builder. This can be used to apply constraints, mark the job as expedited, etc.

4.1.0

Choose a tag to compare

@github-actions github-actions released this 14 Feb 20:02
  • Updates to Kotlin 1.9.22
  • Adds custom toString() implementations for many classes
  • ballast-navigation: Adds override of RoutingTable.fromEnum which accepts EnumEntries<T>
  • ballast-navigation: Adds override of BallastViewModelConfiguration.Builder.withRouter which accepts a deepLink URL
  • Adds ballast-schedules module, for sending Inputs at regularly-scheduled intervals.

4.0.0

Choose a tag to compare

@github-actions github-actions released this 05 Sep 22:40
d8d3791
  • 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

Choose a tag to compare

@github-actions github-actions released this 08 Jun 20:42
661f866
  • Fixes regression where awaitViewModelStart() never calls a terminal Flow operator and doesn't actually suspend.

3.0.1

Choose a tag to compare

@github-actions github-actions released this 14 May 05:03
72f24f7
  • Fixes regression in BallastSavedStateInterceptor

3.0.0

Choose a tag to compare

@github-actions github-actions released this 08 May 00:19
  • 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

Choose a tag to compare

@github-actions github-actions released this 10 Dec 01:32
  • Adds new experimental ballast-navigation module 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