Skip to content

Commit

Permalink
Merge branch 'release-v1.12.1-beta14'
Browse files Browse the repository at this point in the history
* release-v1.12.1-beta14:
  Finish releasing v1.12.1-beta14
  Releasing v1.12.1-beta14
  Ktlint tweaks
  • Loading branch information
rjrjr committed Sep 25, 2024
2 parents 6395d0b + 6330997 commit c562558
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 25 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android.useAndroidX=true
systemProp.org.gradle.internal.publish.checksums.insecure=true

GROUP=com.squareup.workflow1
VERSION_NAME=1.12.1-beta14-SNAPSHOT
VERSION_NAME=1.12.1-beta15-SNAPSHOT

POM_DESCRIPTION=Square Workflow

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,12 @@ public abstract class StatefulWorkflow<
name: String = "safeEventHandler",
crossinline onFailedCast: (name: String, type: KClass<*>, state: StateT) -> Unit =
::defaultOnFailedCast,
crossinline update: // Type variance issue: https://github.com/square/workflow-kotlin/issues/891
WorkflowAction<@UnsafeVariance PropsT, StateT, @UnsafeVariance OutputT>.Updater.(
currentState: CurrentStateT
) -> Unit
// Type variance issue: https://github.com/square/workflow-kotlin/issues/891
crossinline update: WorkflowAction<
@UnsafeVariance PropsT,
StateT,
@UnsafeVariance OutputT
>.Updater.(currentState: CurrentStateT) -> Unit
): () -> Unit {
return eventHandler({ name }) {
CurrentStateT::class.safeCast(state)?.let { currentState -> this.update(currentState) }
Expand All @@ -132,8 +134,11 @@ public abstract class StatefulWorkflow<
name: String = "safeEventHandler",
crossinline onFailedCast: (name: String, type: KClass<*>, state: StateT) -> Unit =
::defaultOnFailedCast,
crossinline update:
WorkflowAction<@UnsafeVariance PropsT, StateT, @UnsafeVariance OutputT>.Updater.(
crossinline update: WorkflowAction<
@UnsafeVariance PropsT,
StateT,
@UnsafeVariance OutputT
>.Updater.(
currentState: CurrentStateT,
event: EventT
) -> Unit
Expand All @@ -149,8 +154,11 @@ public abstract class StatefulWorkflow<
name: String = "safeEventHandler",
crossinline onFailedCast: (name: String, type: KClass<*>, state: StateT) -> Unit =
::defaultOnFailedCast,
crossinline update:
WorkflowAction<@UnsafeVariance PropsT, StateT, @UnsafeVariance OutputT>.Updater.(
crossinline update: WorkflowAction<
@UnsafeVariance PropsT,
StateT,
@UnsafeVariance OutputT
>.Updater.(
currentState: CurrentStateT,
e1: E1,
e2: E2
Expand All @@ -167,8 +175,11 @@ public abstract class StatefulWorkflow<
name: String = "safeEventHandler",
crossinline onFailedCast: (name: String, type: KClass<*>, state: StateT) -> Unit =
::defaultOnFailedCast,
crossinline update:
WorkflowAction<@UnsafeVariance PropsT, StateT, @UnsafeVariance OutputT>.Updater.(
crossinline update: WorkflowAction<
@UnsafeVariance PropsT,
StateT,
@UnsafeVariance OutputT
>.Updater.(
currentState: CurrentStateT,
e1: E1,
e2: E2,
Expand All @@ -186,8 +197,11 @@ public abstract class StatefulWorkflow<
name: String = "safeEventHandler",
crossinline onFailedCast: (name: String, type: KClass<*>, state: StateT) -> Unit =
::defaultOnFailedCast,
crossinline update:
WorkflowAction<@UnsafeVariance PropsT, StateT, @UnsafeVariance OutputT>.Updater.(
crossinline update: WorkflowAction<
@UnsafeVariance PropsT,
StateT,
@UnsafeVariance OutputT
>.Updater.(
currentState: CurrentStateT,
e1: E1,
e2: E2,
Expand All @@ -206,8 +220,11 @@ public abstract class StatefulWorkflow<
name: String = "safeEventHandler",
crossinline onFailedCast: (name: String, type: KClass<*>, state: StateT) -> Unit =
::defaultOnFailedCast,
crossinline update:
WorkflowAction<@UnsafeVariance PropsT, StateT, @UnsafeVariance OutputT>.Updater.(
crossinline update: WorkflowAction<
@UnsafeVariance PropsT,
StateT,
@UnsafeVariance OutputT
>.Updater.(
currentState: CurrentStateT,
e1: E1,
e2: E2,
Expand Down Expand Up @@ -235,8 +252,11 @@ public abstract class StatefulWorkflow<
name: String = "safeEventHandler",
crossinline onFailedCast: (name: String, type: KClass<*>, state: StateT) -> Unit =
::defaultOnFailedCast,
crossinline update:
WorkflowAction<@UnsafeVariance PropsT, StateT, @UnsafeVariance OutputT>.Updater.(
crossinline update: WorkflowAction<
@UnsafeVariance PropsT,
StateT,
@UnsafeVariance OutputT
>.Updater.(
currentState: CurrentStateT,
e1: E1,
e2: E2,
Expand Down Expand Up @@ -266,8 +286,11 @@ public abstract class StatefulWorkflow<
name: String = "safeEventHandler",
crossinline onFailedCast: (name: String, type: KClass<*>, state: StateT) -> Unit =
::defaultOnFailedCast,
crossinline update:
WorkflowAction<@UnsafeVariance PropsT, StateT, @UnsafeVariance OutputT>.Updater.(
crossinline update: WorkflowAction<
@UnsafeVariance PropsT,
StateT,
@UnsafeVariance OutputT
>.Updater.(
currentState: CurrentStateT,
e1: E1,
e2: E2,
Expand Down Expand Up @@ -299,8 +322,11 @@ public abstract class StatefulWorkflow<
name: String = "safeEventHandler",
crossinline onFailedCast: (name: String, type: KClass<*>, state: StateT) -> Unit =
::defaultOnFailedCast,
crossinline update:
WorkflowAction<@UnsafeVariance PropsT, StateT, @UnsafeVariance OutputT>.Updater.(
crossinline update: WorkflowAction<
@UnsafeVariance PropsT,
StateT,
@UnsafeVariance OutputT
>.Updater.(
currentState: CurrentStateT,
e1: E1,
e2: E2,
Expand Down Expand Up @@ -336,8 +362,11 @@ public abstract class StatefulWorkflow<
name: String = "safeEventHandler",
crossinline onFailedCast: (name: String, type: KClass<*>, state: StateT) -> Unit =
::defaultOnFailedCast,
crossinline update:
WorkflowAction<@UnsafeVariance PropsT, StateT, @UnsafeVariance OutputT>.Updater.(
crossinline update: WorkflowAction<
@UnsafeVariance PropsT,
StateT,
@UnsafeVariance OutputT
>.Updater.(
currentState: CurrentStateT,
e1: E1,
e2: E2,
Expand Down Expand Up @@ -375,8 +404,11 @@ public abstract class StatefulWorkflow<
name: String = "safeEventHandler",
crossinline onFailedCast: (name: String, type: KClass<*>, state: StateT) -> Unit =
::defaultOnFailedCast,
crossinline update:
WorkflowAction<@UnsafeVariance PropsT, StateT, @UnsafeVariance OutputT>.Updater.(
crossinline update: WorkflowAction<
@UnsafeVariance PropsT,
StateT,
@UnsafeVariance OutputT
>.Updater.(
currentState: CurrentStateT,
e1: E1,
e2: E2,
Expand Down

0 comments on commit c562558

Please sign in to comment.