preparations for release

This commit is contained in:
InsanusMokrassar 2021-11-05 21:45:01 +06:00
parent 1171a717fe
commit 85cd975492
4 changed files with 21 additions and 6 deletions

View File

@ -5,6 +5,7 @@
* `Versions`:
* `Klock`: `2.4.6` -> `2.4.7`
* `Ktor`: `1.6.4` -> `1.6.5`
* `Exposed`: `0.35.3` -> `0.36.1`
* `Common`:
* Type `Either` got its own serializer
* `FSM`:
@ -12,6 +13,7 @@
* Full rework of FSM:
* Now it is more flexible for checking of handler opportunity to handle state
* Now machine and states managers are type-oriented
* `StateHandlerHolder` has been renamed to `CheckableHandlerHolder`
* Add opportunity for comfortable adding default state handler
## 0.7.4

View File

@ -32,7 +32,7 @@ class CustomizableHandlerHolder<I : O, O : State>(
}
}
fun <I : O, O : State> StateHandlerHolder(
fun <I : O, O : State> CheckableHandlerHolder(
inputKlass: KClass<I>,
strict: Boolean = false,
delegateTo: StatesHandler<I, O>
@ -47,14 +47,27 @@ fun <I : O, O : State> StateHandlerHolder(
}
)
@Deprecated("Renamed", ReplaceWith("CheckableHandlerHolder"))
fun <I : O, O : State> StateHandlerHolder(
inputKlass: KClass<I>,
strict: Boolean = false,
delegateTo: StatesHandler<I, O>
) = CheckableHandlerHolder(inputKlass, strict, delegateTo)
inline fun <reified I : O, O : State> CheckableHandlerHolder(
strict: Boolean = false,
delegateTo: StatesHandler<I, O>
) = CheckableHandlerHolder(I::class, strict, delegateTo)
@Deprecated("Renamed", ReplaceWith("CheckableHandlerHolder"))
inline fun <reified I : O, O : State> StateHandlerHolder(
strict: Boolean = false,
delegateTo: StatesHandler<I, O>
) = StateHandlerHolder(I::class, strict, delegateTo)
) = CheckableHandlerHolder(strict, delegateTo)
inline fun <reified I : O, O: State> StatesHandler<I, O>.holder(
strict: Boolean = true
) = StateHandlerHolder<I, O>(
) = CheckableHandlerHolder<I, O>(
I::class,
strict,
this

View File

@ -12,7 +12,7 @@ class FSMBuilder<T : State>(
private var states = mutableListOf<CustomizableHandlerHolder<T, T>>()
fun <I : T> add(kClass: KClass<I>, handler: StatesHandler<I, T>) {
states.add(StateHandlerHolder(kClass, false, handler))
states.add(CheckableHandlerHolder(kClass, false, handler))
}
fun <I : T> add(filter: suspend (state: State) -> Boolean, handler: StatesHandler<I, T>) {
@ -20,7 +20,7 @@ class FSMBuilder<T : State>(
}
fun <I : T> addStrict(kClass: KClass<I>, handler: StatesHandler<I, T>) {
states.add(StateHandlerHolder(kClass, true, handler))
states.add(CheckableHandlerHolder(kClass, true, handler))
}
inline fun <reified I : T> onStateOrSubstate(handler: StatesHandler<I, T>) {

View File

@ -10,7 +10,7 @@ org.gradle.jvmargs=-Xmx2g
kotlin_version=1.5.31
kotlin_coroutines_version=1.5.2
kotlin_serialisation_core_version=1.3.0
kotlin_exposed_version=0.35.3
kotlin_exposed_version=0.36.1
ktor_version=1.6.5