KStateMachine v.0.34.0
This release contains breaking ABI changes, API should remain compatible with older verisons.
What's Changed
- top-level DSL methods accepting lambdas were marked with
kotlin conracts
contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
}
this allows to initialise variables in lambdas in some cases without using lateinit var.
For this change I had to split some of them (taking nullable lambda) to two separate methods (with non-nullable lambda and without it at all). I expect that you don't have to change your code or imports, but this is ABI breaking change.
-
DataExtractorforDataStatenow will be called in case of implicit state activation, allowing to intercept data from event in such case. SeeisImplicitActivationflag inDataExtractor::extractmethod. This is also ABI breaking change. -
Added new
MutableDataStatestate type. It acts exactly the same way likeDataStatebefore, but allows to mutate thedatamanually withsetDatamethod. This is less strict, but more flexible thenDataStatewhich data can be updated only by transition. -
Add native platforms support. This adds new output artefacts for
linuxX64,mingwX64,macosX64andmacosarm64 -
Update all used libraries and tools to actual versions. Updated Kotlin to
2.2.0, JDK to build project to21. -
Updated publication process to
maven centralas the old one was deprecated bySonatype, please open an Issue if you having some problems with getting artefacts from maven repo. -
Add MutableDataState by @nsk90 in https://github.com/KStateMachine/kstatemachine/pull/119
Full Changelog: https://github.com/KStateMachine/kstatemachine/compare/v.0.33.0...v0.34.0