diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 94c52a5310..0486cdf932 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -19,10 +19,10 @@ object Dependencies { object Compose { const val activity = "androidx.activity:activity-compose:1.3.1" - const val foundation = "androidx.compose.foundation:foundation:1.0.1" - const val material = "androidx.compose.material:material:1.0.1" - const val tooling = "androidx.compose.ui:ui-tooling:1.0.1" - const val ui = "androidx.compose.ui:ui:1.0.1" + const val foundation = "androidx.compose.foundation:foundation:1.1.0-rc01" + const val material = "androidx.compose.material:material:1.1.0-rc01" + const val tooling = "androidx.compose.ui:ui-tooling:1.1.0-rc01" + const val ui = "androidx.compose.ui:ui:1.1.0-rc01" } const val constraint_layout = "androidx.constraintlayout:constraintlayout:2.1.0" @@ -60,15 +60,15 @@ object Dependencies { const val timber = "com.jakewharton.timber:timber:4.7.1" object Moshi { - const val adapters = "com.squareup.moshi:moshi-adapters:1.12.0" - const val codeGen = "com.squareup.moshi:moshi-kotlin-codegen:1.12.0" - const val moshi = "com.squareup.moshi:moshi:1.12.0" + const val adapters = "com.squareup.moshi:moshi-adapters:1.13.0" + const val codeGen = "com.squareup.moshi:moshi-kotlin-codegen:1.13.0" + const val moshi = "com.squareup.moshi:moshi:1.13.0" } object Kotlin { const val binaryCompatibilityValidatorPlugin = "org.jetbrains.kotlinx:binary-compatibility-validator:0.6.0" - const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21" + const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10" object Stdlib { const val common = "org.jetbrains.kotlin:kotlin-stdlib-common" @@ -85,11 +85,11 @@ object Dependencies { const val test = "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.1" } - const val reflect = "org.jetbrains.kotlin:kotlin-reflect:1.5.21" + const val reflect = "org.jetbrains.kotlin:kotlin-reflect:1.6.10" object Serialization { - const val gradlePlugin = "org.jetbrains.kotlin:kotlin-serialization:1.5.20" - const val json = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.2" + const val gradlePlugin = "org.jetbrains.kotlin:kotlin-serialization:1.6.10" + const val json = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2" } object Test { @@ -101,7 +101,7 @@ object Dependencies { } } - const val dokka = "org.jetbrains.dokka:dokka-gradle-plugin:1.4.32" // 1.5.0? + const val dokka = "org.jetbrains.dokka:dokka-gradle-plugin:1.5.31" object Jmh { const val gradlePlugin = "me.champeau.gradle:jmh-gradle-plugin:0.5.3" diff --git a/samples/compose-samples/build.gradle.kts b/samples/compose-samples/build.gradle.kts index a7cc96468a..c2c88b7393 100644 --- a/samples/compose-samples/build.gradle.kts +++ b/samples/compose-samples/build.gradle.kts @@ -14,7 +14,7 @@ android { compose = true } composeOptions { - kotlinCompilerExtensionVersion = "1.0.1" + kotlinCompilerExtensionVersion = "1.1.0-rc02" } } diff --git a/samples/compose-samples/src/main/java/com/squareup/sample/compose/inlinerendering/InlineRenderingWorkflow.kt b/samples/compose-samples/src/main/java/com/squareup/sample/compose/inlinerendering/InlineRenderingWorkflow.kt index 17badd16ce..c4e04ae58f 100644 --- a/samples/compose-samples/src/main/java/com/squareup/sample/compose/inlinerendering/InlineRenderingWorkflow.kt +++ b/samples/compose-samples/src/main/java/com/squareup/sample/compose/inlinerendering/InlineRenderingWorkflow.kt @@ -65,8 +65,8 @@ object InlineRenderingWorkflow : StatefulWorkflow by lazy { val traceFile = traceFilesDir.resolve("workflow-trace-dungeon.json") diff --git a/samples/dungeon/timemachine-shakeable/src/main/java/com/squareup/sample/timemachine/shakeable/ShakeableTimeMachineLayoutRunner.kt b/samples/dungeon/timemachine-shakeable/src/main/java/com/squareup/sample/timemachine/shakeable/ShakeableTimeMachineLayoutRunner.kt index f65d42daf1..bf600db9a5 100644 --- a/samples/dungeon/timemachine-shakeable/src/main/java/com/squareup/sample/timemachine/shakeable/ShakeableTimeMachineLayoutRunner.kt +++ b/samples/dungeon/timemachine-shakeable/src/main/java/com/squareup/sample/timemachine/shakeable/ShakeableTimeMachineLayoutRunner.kt @@ -15,6 +15,7 @@ import com.squareup.workflow1.ui.ViewFactory import com.squareup.workflow1.ui.WorkflowViewStub import com.squareup.workflow1.ui.backPressedHandler import kotlin.time.Duration +import kotlin.time.Duration.Companion.milliseconds import kotlin.time.ExperimentalTime /** @@ -83,7 +84,7 @@ class ShakeableTimeMachineLayoutRunner( } private fun Duration.toProgressInt(): Int = this.inWholeMilliseconds.toInt() - private fun Int.toProgressDuration(): Duration = Duration.milliseconds(this) + private fun Int.toProgressDuration(): Duration = this.milliseconds private fun Duration.toUiString(): String = toString() diff --git a/samples/dungeon/timemachine/src/test/java/com/squareup/sample/timemachine/RecorderWorkflowTest.kt b/samples/dungeon/timemachine/src/test/java/com/squareup/sample/timemachine/RecorderWorkflowTest.kt index 300c58183c..466f97c686 100644 --- a/samples/dungeon/timemachine/src/test/java/com/squareup/sample/timemachine/RecorderWorkflowTest.kt +++ b/samples/dungeon/timemachine/src/test/java/com/squareup/sample/timemachine/RecorderWorkflowTest.kt @@ -6,7 +6,7 @@ import com.squareup.sample.timemachine.RecorderWorkflow.RecorderProps.RecordValu import com.squareup.sample.timemachine.RecorderWorkflow.Recording import com.squareup.workflow1.testing.testRender import org.junit.Test -import kotlin.time.Duration +import kotlin.time.Duration.Companion.milliseconds import kotlin.time.ExperimentalTime import kotlin.time.TestTimeSource @@ -17,18 +17,18 @@ class RecorderWorkflowTest { val clock = TestTimeSource() val workflow = RecorderWorkflow(clock) val startTime = clock.markNow() - clock += Duration.milliseconds(42) + clock += 42.milliseconds val newState = workflow.onPropsChanged( old = RecordValue("foo"), new = RecordValue("bar"), state = Recording( startTime = startTime, - series = TimeSeries(listOf("foo" to Duration.milliseconds(0))) + series = TimeSeries(listOf("foo" to 0.milliseconds)) ) ) - assertThat(newState.series.duration).isEqualTo(Duration.milliseconds(42)) + assertThat(newState.series.duration).isEqualTo(42.milliseconds) assertThat(newState.series.values.toList()).isEqualTo(listOf("foo", "bar")) } @@ -36,18 +36,18 @@ class RecorderWorkflowTest { val clock = TestTimeSource() val workflow = RecorderWorkflow(clock) val startTime = clock.markNow() - clock += Duration.milliseconds(42) + clock += 42.milliseconds val newState = workflow.onPropsChanged( old = RecordValue("foo"), - new = PlaybackAt(Duration.milliseconds(42)), + new = PlaybackAt(42.milliseconds), state = Recording( startTime = startTime, - series = TimeSeries(listOf("foo" to Duration.milliseconds(0))) + series = TimeSeries(listOf("foo" to 0.milliseconds)) ) ) - assertThat(newState.series.duration).isEqualTo(Duration.milliseconds(0)) + assertThat(newState.series.duration).isEqualTo(0.milliseconds) assertThat(newState.series.values.toList()).isEqualTo(listOf("foo")) } @@ -61,7 +61,7 @@ class RecorderWorkflowTest { props = RecordValue("bar"), initialState = Recording( startTime = startTime, - series = TimeSeries(listOf("foo" to Duration.milliseconds(42))) + series = TimeSeries(listOf("foo" to 42.milliseconds)) ) ) .render { rendering -> @@ -76,13 +76,13 @@ class RecorderWorkflowTest { workflow .testRender( - props = PlaybackAt(Duration.milliseconds(10)), + props = PlaybackAt(10.milliseconds), initialState = Recording( startTime = startTime, series = TimeSeries( listOf( - "foo" to Duration.milliseconds(0), - "bar" to Duration.milliseconds(42) + "foo" to 0.milliseconds, + "bar" to 42.milliseconds ) ) ) diff --git a/samples/dungeon/timemachine/src/test/java/com/squareup/sample/timemachine/TimeMachineWorkflowTest.kt b/samples/dungeon/timemachine/src/test/java/com/squareup/sample/timemachine/TimeMachineWorkflowTest.kt index c8af4152dd..c6bad9727c 100644 --- a/samples/dungeon/timemachine/src/test/java/com/squareup/sample/timemachine/TimeMachineWorkflowTest.kt +++ b/samples/dungeon/timemachine/src/test/java/com/squareup/sample/timemachine/TimeMachineWorkflowTest.kt @@ -9,6 +9,7 @@ import com.squareup.workflow1.stateful import com.squareup.workflow1.testing.launchForTestingFromStartWith import org.junit.Test import kotlin.time.Duration +import kotlin.time.Duration.Companion.seconds import kotlin.time.ExperimentalTime import kotlin.time.TestTimeSource @@ -34,7 +35,7 @@ class TimeMachineWorkflowTest { // Record some renderings. awaitNextRendering().let { rendering -> assertThat(rendering.value.state).isEqualTo("initial") - clock += Duration.seconds(1) + clock += 1.seconds rendering.value.setState("second") } awaitNextRendering().let { rendering -> @@ -45,14 +46,14 @@ class TimeMachineWorkflowTest { sendProps(PlayingBackAt(Unit, Duration.ZERO)) awaitNextRendering().let { rendering -> assertThat(rendering.value.state).isEqualTo("initial") - assertThat(rendering.totalDuration).isEqualTo(Duration.seconds(1)) + assertThat(rendering.totalDuration).isEqualTo(1.seconds) } - clock += Duration.seconds(1) - sendProps(PlayingBackAt(Unit, Duration.seconds(1))) + clock += 1.seconds + sendProps(PlayingBackAt(Unit, 1.seconds)) awaitNextRendering().let { rendering -> assertThat(rendering.value.state).isEqualTo("second") - assertThat(rendering.totalDuration).isEqualTo(Duration.seconds(1)) + assertThat(rendering.totalDuration).isEqualTo(1.seconds) rendering.value.setState("third") } @@ -61,7 +62,7 @@ class TimeMachineWorkflowTest { sendProps(Recording(Unit)) awaitNextRendering().let { rendering -> assertThat(rendering.value.state).isEqualTo("third") - assertThat(rendering.totalDuration).isEqualTo(Duration.seconds(2)) + assertThat(rendering.totalDuration).isEqualTo(2.seconds) } } } diff --git a/samples/dungeon/timemachine/src/test/java/com/squareup/sample/timemachine/TimeSeriesTest.kt b/samples/dungeon/timemachine/src/test/java/com/squareup/sample/timemachine/TimeSeriesTest.kt index 1b18c6f9f1..303c7ce571 100644 --- a/samples/dungeon/timemachine/src/test/java/com/squareup/sample/timemachine/TimeSeriesTest.kt +++ b/samples/dungeon/timemachine/src/test/java/com/squareup/sample/timemachine/TimeSeriesTest.kt @@ -4,6 +4,8 @@ import com.google.common.truth.Truth.assertThat import org.junit.Test import kotlin.test.assertFailsWith import kotlin.time.Duration +import kotlin.time.Duration.Companion.days +import kotlin.time.Duration.Companion.milliseconds import kotlin.time.ExperimentalTime @OptIn(ExperimentalTime::class) @@ -16,60 +18,60 @@ class TimeSeriesTest { } @Test fun `duration increases after append`() { - series.append("foo", Duration.milliseconds(42)) + series.append("foo", 42.milliseconds) .let { - assertThat(it.duration).isEqualTo(Duration.milliseconds(42)) + assertThat(it.duration).isEqualTo(42.milliseconds) } } @Test fun `duration increases after multiple appends`() { - series.append("foo", Duration.milliseconds(2)) - .append("bar", Duration.milliseconds(42)) + series.append("foo", 2.milliseconds) + .append("bar", 42.milliseconds) .let { - assertThat(it.duration).isEqualTo(Duration.milliseconds(42)) + assertThat(it.duration).isEqualTo(42.milliseconds) } } @Test fun `throws when appending value from the past`() { - val series1 = series.append("foo", Duration.milliseconds(42)) + val series1 = series.append("foo", 42.milliseconds) assertFailsWith { - series1.append("bar", Duration.milliseconds(41)) + series1.append("bar", 41.milliseconds) } } @Test fun `allows appending value with last timestamp`() { - series.append("foo", Duration.milliseconds(42)) - .append("bar", Duration.milliseconds(42)) + series.append("foo", 42.milliseconds) + .append("bar", 42.milliseconds) .let { - assertThat(it.duration).isEqualTo(Duration.milliseconds(42)) + assertThat(it.duration).isEqualTo(42.milliseconds) } } @Test fun `findValueNearest with empty list`() { assertFailsWith { - series.findValueNearest(Duration.milliseconds(42)) + series.findValueNearest(42.milliseconds) } } @Test fun `findValueNearest with single value`() { - series.append("foo", Duration.milliseconds(42)) + series.append("foo", 42.milliseconds) .let { - assertThat(it.findValueNearest(Duration.milliseconds(0))).isEqualTo("foo") - assertThat(it.findValueNearest(Duration.milliseconds(42))).isEqualTo("foo") - assertThat(it.findValueNearest(Duration.days(100))).isEqualTo("foo") + assertThat(it.findValueNearest(0.milliseconds)).isEqualTo("foo") + assertThat(it.findValueNearest(42.milliseconds)).isEqualTo("foo") + assertThat(it.findValueNearest(100.days)).isEqualTo("foo") } } @Test fun `findValueNearest with multiple values`() { - series.append("foo", Duration.milliseconds(41)) - .append("bar", Duration.milliseconds(43)) + series.append("foo", 41.milliseconds) + .append("bar", 43.milliseconds) .let { - assertThat(it.findValueNearest(Duration.milliseconds(0))).isEqualTo("foo") - assertThat(it.findValueNearest(Duration.milliseconds(41))).isEqualTo("foo") - assertThat(it.findValueNearest(Duration.milliseconds(42))).isEqualTo("foo") - assertThat(it.findValueNearest(Duration.milliseconds(43))).isEqualTo("bar") - assertThat(it.findValueNearest(Duration.days(100))).isEqualTo("bar") + assertThat(it.findValueNearest(0.milliseconds)).isEqualTo("foo") + assertThat(it.findValueNearest(41.milliseconds)).isEqualTo("foo") + assertThat(it.findValueNearest(42.milliseconds)).isEqualTo("foo") + assertThat(it.findValueNearest(43.milliseconds)).isEqualTo("bar") + assertThat(it.findValueNearest(100.days)).isEqualTo("bar") } } } diff --git a/samples/hello-terminal/todo-terminal-app/src/main/java/com/squareup/sample/hellotodo/TodoWorkflow.kt b/samples/hello-terminal/todo-terminal-app/src/main/java/com/squareup/sample/hellotodo/TodoWorkflow.kt index 0a5ce7a35a..908bf1e1bc 100644 --- a/samples/hello-terminal/todo-terminal-app/src/main/java/com/squareup/sample/hellotodo/TodoWorkflow.kt +++ b/samples/hello-terminal/todo-terminal-app/src/main/java/com/squareup/sample/hellotodo/TodoWorkflow.kt @@ -77,7 +77,7 @@ class TodoWorkflow : TerminalWorkflow, override fun snapshotState(state: TodoList): Snapshot? = null private fun onKeystroke(key: KeyStroke) = action { - @Suppress("NON_EXHAUSTIVE_WHEN") + @Suppress("NON_EXHAUSTIVE_WHEN_STATEMENT") when (key.keyType) { ArrowUp -> state = state.moveFocusUp() ArrowDown -> state = state.moveFocusDown() diff --git a/samples/tictactoe/app/src/main/java/com/squareup/sample/mainactivity/TicTacToeComponent.kt b/samples/tictactoe/app/src/main/java/com/squareup/sample/mainactivity/TicTacToeComponent.kt index 472097ea33..f9f1eed496 100644 --- a/samples/tictactoe/app/src/main/java/com/squareup/sample/mainactivity/TicTacToeComponent.kt +++ b/samples/tictactoe/app/src/main/java/com/squareup/sample/mainactivity/TicTacToeComponent.kt @@ -17,6 +17,7 @@ import com.squareup.sample.gameworkflow.RealTakeTurnsWorkflow import com.squareup.sample.gameworkflow.RunGameWorkflow import com.squareup.sample.gameworkflow.TakeTurnsWorkflow import com.squareup.sample.mainworkflow.TicTacToeWorkflow +import com.squareup.workflow1.ui.WorkflowUiExperimentalApi import io.reactivex.Single import io.reactivex.android.schedulers.AndroidSchedulers.mainThread import timber.log.Timber @@ -24,6 +25,7 @@ import timber.log.Timber /** * Pretend generated code of a pretend DI framework. */ +@OptIn(WorkflowUiExperimentalApi::class) class TicTacToeComponent : ViewModel() { private val countingIdlingResource = CountingIdlingResource("AuthServiceIdling") val idlingResource: IdlingResource = countingIdlingResource diff --git a/samples/tictactoe/common/src/main/java/com/squareup/sample/gameworkflow/RunGameWorkflow.kt b/samples/tictactoe/common/src/main/java/com/squareup/sample/gameworkflow/RunGameWorkflow.kt index 0d6cc223aa..99abe22355 100644 --- a/samples/tictactoe/common/src/main/java/com/squareup/sample/gameworkflow/RunGameWorkflow.kt +++ b/samples/tictactoe/common/src/main/java/com/squareup/sample/gameworkflow/RunGameWorkflow.kt @@ -42,6 +42,7 @@ typealias RunGameScreen = AlertContainerScreen> * We define this otherwise redundant typealias to keep composite workflows * that build on [RunGameWorkflow] decoupled from it, for ease of testing. */ +@OptIn(WorkflowUiExperimentalApi::class) typealias RunGameWorkflow = Workflow /** diff --git a/samples/tictactoe/common/src/main/java/com/squareup/sample/mainworkflow/TicTacToeWorkflow.kt b/samples/tictactoe/common/src/main/java/com/squareup/sample/mainworkflow/TicTacToeWorkflow.kt index 5b3b5d4485..b32052f98f 100644 --- a/samples/tictactoe/common/src/main/java/com/squareup/sample/mainworkflow/TicTacToeWorkflow.kt +++ b/samples/tictactoe/common/src/main/java/com/squareup/sample/mainworkflow/TicTacToeWorkflow.kt @@ -36,6 +36,7 @@ import com.squareup.workflow1.ui.modal.AlertContainerScreen * A [Unit] output event is emitted to signal that the workflow has ended, and the host * activity should be finished. */ +@OptIn(WorkflowUiExperimentalApi::class) class TicTacToeWorkflow( private val authWorkflow: AuthWorkflow, private val runGameWorkflow: RunGameWorkflow diff --git a/samples/tutorial/build.gradle b/samples/tutorial/build.gradle index c594b78198..278874d873 100644 --- a/samples/tutorial/build.gradle +++ b/samples/tutorial/build.gradle @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { - kotlin_version = "1.5.21" + kotlin_version = "1.6.10" workflow_version = "1.0.0" deps = [ diff --git a/trace-encoder/api/trace-encoder.api b/trace-encoder/api/trace-encoder.api index cb25a68d80..7e15bfaf27 100644 --- a/trace-encoder/api/trace-encoder.api +++ b/trace-encoder/api/trace-encoder.api @@ -1,3 +1,71 @@ +public final class com/squareup/tracing/ChromeTraceEvent { + public static final field Companion Lcom/squareup/tracing/ChromeTraceEvent$Companion; + public static final field INSTANT_SCOPE_GLOBAL C + public static final field INSTANT_SCOPE_PROCESS C + public static final field INSTANT_SCOPE_THREAD C + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/squareup/tracing/ChromeTraceEvent$Phase;JIILjava/lang/Object;Ljava/lang/Character;Ljava/util/Map;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/squareup/tracing/ChromeTraceEvent$Phase;JIILjava/lang/Object;Ljava/lang/Character;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Lcom/squareup/tracing/ChromeTraceEvent$Phase; + public final fun component4 ()J + public final fun component5 ()I + public final fun component6 ()I + public final fun component7 ()Ljava/lang/Object; + public final fun component8 ()Ljava/lang/Character; + public final fun component9 ()Ljava/util/Map; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Lcom/squareup/tracing/ChromeTraceEvent$Phase;JIILjava/lang/Object;Ljava/lang/Character;Ljava/util/Map;)Lcom/squareup/tracing/ChromeTraceEvent; + public static synthetic fun copy$default (Lcom/squareup/tracing/ChromeTraceEvent;Ljava/lang/String;Ljava/lang/String;Lcom/squareup/tracing/ChromeTraceEvent$Phase;JIILjava/lang/Object;Ljava/lang/Character;Ljava/util/Map;ILjava/lang/Object;)Lcom/squareup/tracing/ChromeTraceEvent; + public fun equals (Ljava/lang/Object;)Z + public final fun getArgs ()Ljava/util/Map; + public final fun getCategory ()Ljava/lang/String; + public final fun getId ()Ljava/lang/Object; + public final fun getName ()Ljava/lang/String; + public final fun getPhase ()Lcom/squareup/tracing/ChromeTraceEvent$Phase; + public final fun getProcessId ()I + public final fun getScope ()Ljava/lang/Character; + public final fun getThreadId ()I + public final fun getTimestampMicros ()J + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public final fun writeTo (Lokio/BufferedSink;)V +} + +public final class com/squareup/tracing/ChromeTraceEvent$Companion { +} + +public final class com/squareup/tracing/ChromeTraceEvent$Phase : java/lang/Enum { + public static final field ASYNC_BEGIN Lcom/squareup/tracing/ChromeTraceEvent$Phase; + public static final field ASYNC_END Lcom/squareup/tracing/ChromeTraceEvent$Phase; + public static final field ASYNC_INSTANT Lcom/squareup/tracing/ChromeTraceEvent$Phase; + public static final field COMPLETE Lcom/squareup/tracing/ChromeTraceEvent$Phase; + public static final field COUNTER Lcom/squareup/tracing/ChromeTraceEvent$Phase; + public static final field DURATION_BEGIN Lcom/squareup/tracing/ChromeTraceEvent$Phase; + public static final field DURATION_END Lcom/squareup/tracing/ChromeTraceEvent$Phase; + public static final field INSTANT Lcom/squareup/tracing/ChromeTraceEvent$Phase; + public static final field METADATA Lcom/squareup/tracing/ChromeTraceEvent$Phase; + public static final field OBJECT_CREATED Lcom/squareup/tracing/ChromeTraceEvent$Phase; + public static final field OBJECT_DESTROYED Lcom/squareup/tracing/ChromeTraceEvent$Phase; + public static final field OBJECT_SNAPSHOT Lcom/squareup/tracing/ChromeTraceEvent$Phase; + public final fun getCode$wf1_trace_encoder ()C + public static fun valueOf (Ljava/lang/String;)Lcom/squareup/tracing/ChromeTraceEvent$Phase; + public static fun values ()[Lcom/squareup/tracing/ChromeTraceEvent$Phase; +} + +public final class com/squareup/tracing/ChromeTraceEventJsonAdapter : com/squareup/moshi/JsonAdapter { + public fun (Lcom/squareup/moshi/Moshi;)V + public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/squareup/tracing/ChromeTraceEvent; + public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object; + public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/squareup/tracing/ChromeTraceEvent;)V + public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V + public fun toString ()Ljava/lang/String; +} + +public final class com/squareup/tracing/ChromeTraceEventKt { + public static final fun createProcessNameEvent (Ljava/lang/String;IJ)Lcom/squareup/tracing/ChromeTraceEvent; + public static final fun createThreadNameEvent (Ljava/lang/String;IIJ)Lcom/squareup/tracing/ChromeTraceEvent; +} + public abstract interface class com/squareup/tracing/TimeMark { public abstract fun getElapsedNow ()J } @@ -8,6 +76,8 @@ public final class com/squareup/tracing/TraceEncoder : java/io/Closeable { public fun close ()V public final fun createLogger (Ljava/lang/String;Ljava/lang/String;)Lcom/squareup/tracing/TraceLogger; public static synthetic fun createLogger$default (Lcom/squareup/tracing/TraceEncoder;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/squareup/tracing/TraceLogger; + public final fun log$wf1_trace_encoder (IILcom/squareup/tracing/TraceEvent;)V + public final fun log$wf1_trace_encoder (IILjava/util/List;)V } public abstract class com/squareup/tracing/TraceEvent { @@ -165,6 +235,10 @@ public final class com/squareup/tracing/TraceEvent$ObjectSnapshot : com/squareup public fun toString ()Ljava/lang/String; } +public final class com/squareup/tracing/TraceEventKt { + public static final fun toChromeTraceEvent (Lcom/squareup/tracing/TraceEvent;IIJ)Lcom/squareup/tracing/ChromeTraceEvent; +} + public abstract interface class com/squareup/tracing/TraceLogger { public abstract fun log (Lcom/squareup/tracing/TraceEvent;)V public abstract fun log (Ljava/util/List;)V diff --git a/workflow-core/api/workflow-core.api b/workflow-core/api/workflow-core.api index 3f9e030caf..f540ed9da1 100644 --- a/workflow-core/api/workflow-core.api +++ b/workflow-core/api/workflow-core.api @@ -88,9 +88,11 @@ public final class com/squareup/workflow1/Snapshots { public static final fun parse (Lokio/ByteString;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun readBooleanFromInt (Lokio/BufferedSource;)Z public static final fun readByteStringWithLength (Lokio/BufferedSource;)Lokio/ByteString; + public static final synthetic fun readEnumByOrdinal (Lokio/BufferedSource;)Ljava/lang/Enum; public static final fun readFloat (Lokio/BufferedSource;)F public static final fun readList (Lokio/BufferedSource;Lkotlin/jvm/functions/Function1;)Ljava/util/List; public static final fun readNullable (Lokio/BufferedSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; + public static final synthetic fun readOptionalEnumByOrdinal (Lokio/BufferedSource;)Ljava/lang/Enum; public static final fun readOptionalUtf8WithLength (Lokio/BufferedSource;)Ljava/lang/String; public static final fun readUtf8WithLength (Lokio/BufferedSource;)Ljava/lang/String; public static final fun writeBooleanAsInt (Lokio/BufferedSink;Z)Lokio/BufferedSink; @@ -114,6 +116,7 @@ public abstract class com/squareup/workflow1/StatefulWorkflow : com/squareup/wor } public final class com/squareup/workflow1/StatefulWorkflow$RenderContext : com/squareup/workflow1/BaseRenderContext { + public fun (Lcom/squareup/workflow1/StatefulWorkflow;Lcom/squareup/workflow1/BaseRenderContext;)V public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function10;)Lkotlin/jvm/functions/Function9; public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function11;)Lkotlin/jvm/functions/Function10; public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;)Lkotlin/jvm/functions/Function0; @@ -137,6 +140,7 @@ public abstract class com/squareup/workflow1/StatelessWorkflow : com/squareup/wo } public final class com/squareup/workflow1/StatelessWorkflow$RenderContext : com/squareup/workflow1/BaseRenderContext { + public fun (Lcom/squareup/workflow1/StatelessWorkflow;Lcom/squareup/workflow1/BaseRenderContext;)V public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function10;)Lkotlin/jvm/functions/Function9; public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function11;)Lkotlin/jvm/functions/Function10; public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;)Lkotlin/jvm/functions/Function0; @@ -167,8 +171,11 @@ public abstract interface class com/squareup/workflow1/Worker { } public final class com/squareup/workflow1/Worker$Companion { + public final synthetic fun create (Lkotlin/jvm/functions/Function2;)Lcom/squareup/workflow1/Worker; public final fun createSideEffect (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/Worker; public final fun finished ()Lcom/squareup/workflow1/Worker; + public final synthetic fun from (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/Worker; + public final synthetic fun fromNullable (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/Worker; public final fun timer (JLjava/lang/String;)Lcom/squareup/workflow1/Worker; public static synthetic fun timer$default (Lcom/squareup/workflow1/Worker$Companion;JLjava/lang/String;ILjava/lang/Object;)Lcom/squareup/workflow1/Worker; } @@ -177,6 +184,21 @@ public final class com/squareup/workflow1/Worker$DefaultImpls { public static fun doesSameWorkAs (Lcom/squareup/workflow1/Worker;Lcom/squareup/workflow1/Worker;)Z } +public final class com/squareup/workflow1/WorkerWorkflow : com/squareup/workflow1/StatefulWorkflow, com/squareup/workflow1/ImpostorWorkflow { + public fun (Lkotlin/reflect/KType;Ljava/lang/String;)V + public fun describeRealIdentifier ()Ljava/lang/String; + public fun getRealIdentifier ()Lcom/squareup/workflow1/WorkflowIdentifier; + public final fun getWorkerType ()Lkotlin/reflect/KType; + public fun initialState (Lcom/squareup/workflow1/Worker;Lcom/squareup/workflow1/Snapshot;)Ljava/lang/Integer; + public synthetic fun initialState (Ljava/lang/Object;Lcom/squareup/workflow1/Snapshot;)Ljava/lang/Object; + public fun onPropsChanged (Lcom/squareup/workflow1/Worker;Lcom/squareup/workflow1/Worker;I)Ljava/lang/Integer; + public synthetic fun onPropsChanged (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; + public fun render (Lcom/squareup/workflow1/Worker;ILcom/squareup/workflow1/StatefulWorkflow$RenderContext;)V + public synthetic fun render (Ljava/lang/Object;Ljava/lang/Object;Lcom/squareup/workflow1/StatefulWorkflow$RenderContext;)Ljava/lang/Object; + public fun snapshotState (I)Lcom/squareup/workflow1/Snapshot; + public synthetic fun snapshotState (Ljava/lang/Object;)Lcom/squareup/workflow1/Snapshot; +} + public abstract interface class com/squareup/workflow1/Workflow { public static final field Companion Lcom/squareup/workflow1/Workflow$Companion; public abstract fun asStatefulWorkflow ()Lcom/squareup/workflow1/StatefulWorkflow; @@ -197,6 +219,7 @@ public final class com/squareup/workflow1/WorkflowAction$Companion { public final class com/squareup/workflow1/WorkflowAction$Updater { public fun (Lcom/squareup/workflow1/WorkflowAction;Ljava/lang/Object;Ljava/lang/Object;)V + public final fun getMaybeOutput$wf1_workflow_core ()Lcom/squareup/workflow1/WorkflowOutput; public final fun getProps ()Ljava/lang/Object; public final fun getState ()Ljava/lang/Object; public final fun setOutput (Ljava/lang/Object;)V @@ -205,6 +228,8 @@ public final class com/squareup/workflow1/WorkflowAction$Updater { public final class com/squareup/workflow1/WorkflowIdentifier { public static final field Companion Lcom/squareup/workflow1/WorkflowIdentifier$Companion; + public fun (Lkotlin/reflect/KAnnotatedElement;Lcom/squareup/workflow1/WorkflowIdentifier;Lkotlin/jvm/functions/Function0;)V + public synthetic fun (Lkotlin/reflect/KAnnotatedElement;Lcom/squareup/workflow1/WorkflowIdentifier;Lkotlin/jvm/functions/Function0;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public fun equals (Ljava/lang/Object;)Z public final fun getRealIdentifierType ()Lkotlin/reflect/KAnnotatedElement; public fun hashCode ()I @@ -237,6 +262,8 @@ public final class com/squareup/workflow1/Workflows { public static synthetic fun action$default (Lcom/squareup/workflow1/StatelessWorkflow;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/squareup/workflow1/WorkflowAction; public static synthetic fun action$default (Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/squareup/workflow1/WorkflowAction; public static final fun applyTo (Lcom/squareup/workflow1/WorkflowAction;Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair; + public static final synthetic fun asWorker (Lkotlinx/coroutines/flow/Flow;)Lcom/squareup/workflow1/Worker; + public static final fun collectToSink (Lkotlinx/coroutines/flow/Flow;Lcom/squareup/workflow1/Sink;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun contraMap (Lcom/squareup/workflow1/Sink;Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/Sink; public static final fun getIdentifier (Lcom/squareup/workflow1/Workflow;)Lcom/squareup/workflow1/WorkflowIdentifier; public static final fun getWorkflowIdentifier (Lkotlin/reflect/KClass;)Lcom/squareup/workflow1/WorkflowIdentifier; @@ -248,8 +275,14 @@ public final class com/squareup/workflow1/Workflows { public static synthetic fun renderChild$default (Lcom/squareup/workflow1/BaseRenderContext;Lcom/squareup/workflow1/Workflow;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun renderChild$default (Lcom/squareup/workflow1/BaseRenderContext;Lcom/squareup/workflow1/Workflow;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/Object; public static final fun rendering (Lcom/squareup/workflow1/Workflow$Companion;Ljava/lang/Object;)Lcom/squareup/workflow1/Workflow; + public static final fun runWorker (Lcom/squareup/workflow1/Worker;Ljava/lang/String;Lcom/squareup/workflow1/Sink;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final synthetic fun runningWorker (Lcom/squareup/workflow1/BaseRenderContext;Lcom/squareup/workflow1/Worker;Ljava/lang/String;)V + public static final synthetic fun runningWorker (Lcom/squareup/workflow1/BaseRenderContext;Lcom/squareup/workflow1/Worker;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V public static final fun runningWorker (Lcom/squareup/workflow1/BaseRenderContext;Lcom/squareup/workflow1/Worker;Lkotlin/reflect/KType;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V + public static synthetic fun runningWorker$default (Lcom/squareup/workflow1/BaseRenderContext;Lcom/squareup/workflow1/Worker;Ljava/lang/String;ILjava/lang/Object;)V + public static synthetic fun runningWorker$default (Lcom/squareup/workflow1/BaseRenderContext;Lcom/squareup/workflow1/Worker;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public static synthetic fun runningWorker$default (Lcom/squareup/workflow1/BaseRenderContext;Lcom/squareup/workflow1/Worker;Lkotlin/reflect/KType;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public static final fun sendAndAwaitApplication (Lcom/squareup/workflow1/Sink;Lcom/squareup/workflow1/WorkflowAction;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun stateful (Lcom/squareup/workflow1/Workflow$Companion;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Lcom/squareup/workflow1/StatefulWorkflow; public static final fun stateful (Lcom/squareup/workflow1/Workflow$Companion;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/StatefulWorkflow; public static final fun stateful (Lcom/squareup/workflow1/Workflow$Companion;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;)Lcom/squareup/workflow1/StatefulWorkflow; diff --git a/workflow-runtime/api/workflow-runtime.api b/workflow-runtime/api/workflow-runtime.api index 82ce0347a1..94127292f0 100644 --- a/workflow-runtime/api/workflow-runtime.api +++ b/workflow-runtime/api/workflow-runtime.api @@ -35,7 +35,10 @@ public class com/squareup/workflow1/SimpleLoggingWorkflowInterceptor : com/squar public final class com/squareup/workflow1/TreeSnapshot { public static final field Companion Lcom/squareup/workflow1/TreeSnapshot$Companion; + public fun (Lcom/squareup/workflow1/Snapshot;Lkotlin/jvm/functions/Function0;)V public fun equals (Ljava/lang/Object;)Z + public final fun getChildTreeSnapshots$wf1_workflow_runtime ()Ljava/util/Map; + public final fun getWorkflowSnapshot$wf1_workflow_runtime ()Lcom/squareup/workflow1/Snapshot; public fun hashCode ()I public final fun toByteString ()Lokio/ByteString; } @@ -80,3 +83,175 @@ public abstract interface class com/squareup/workflow1/WorkflowInterceptor$Workf public abstract fun getSessionId ()J } +public final class com/squareup/workflow1/WorkflowInterceptorKt { + public static final fun intercept (Lcom/squareup/workflow1/WorkflowInterceptor;Lcom/squareup/workflow1/StatefulWorkflow;Lcom/squareup/workflow1/WorkflowInterceptor$WorkflowSession;)Lcom/squareup/workflow1/StatefulWorkflow; +} + +public final class com/squareup/workflow1/internal/ActiveStagingList { + public fun ()V + public final fun commitStaging (Lkotlin/jvm/functions/Function1;)V + public final fun forEachActive (Lkotlin/jvm/functions/Function1;)V + public final fun forEachStaging (Lkotlin/jvm/functions/Function1;)V + public final fun retainOrCreate (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;)Lcom/squareup/workflow1/internal/InlineLinkedList$InlineListNode; +} + +public final class com/squareup/workflow1/internal/ChainedWorkflowInterceptor : com/squareup/workflow1/WorkflowInterceptor { + public fun (Ljava/util/List;)V + public fun onInitialState (Ljava/lang/Object;Lcom/squareup/workflow1/Snapshot;Lkotlin/jvm/functions/Function2;Lcom/squareup/workflow1/WorkflowInterceptor$WorkflowSession;)Ljava/lang/Object; + public fun onPropsChanged (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Lkotlin/jvm/functions/Function3;Lcom/squareup/workflow1/WorkflowInterceptor$WorkflowSession;)Ljava/lang/Object; + public fun onRender (Ljava/lang/Object;Ljava/lang/Object;Lcom/squareup/workflow1/BaseRenderContext;Lkotlin/jvm/functions/Function3;Lcom/squareup/workflow1/WorkflowInterceptor$WorkflowSession;)Ljava/lang/Object; + public fun onSessionStarted (Lkotlinx/coroutines/CoroutineScope;Lcom/squareup/workflow1/WorkflowInterceptor$WorkflowSession;)V + public fun onSnapshotState (Ljava/lang/Object;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/WorkflowInterceptor$WorkflowSession;)Lcom/squareup/workflow1/Snapshot; +} + +public final class com/squareup/workflow1/internal/ChainedWorkflowInterceptorKt { + public static final fun chained (Ljava/util/List;)Lcom/squareup/workflow1/WorkflowInterceptor; +} + +public final class com/squareup/workflow1/internal/IdCounter { + public fun ()V + public final fun createId ()J +} + +public final class com/squareup/workflow1/internal/IdCounterKt { + public static final fun createId (Lcom/squareup/workflow1/internal/IdCounter;)J +} + +public final class com/squareup/workflow1/internal/InlineLinkedList { + public fun ()V + public final fun clear ()V + public final fun forEach (Lkotlin/jvm/functions/Function1;)V + public final fun getHead ()Lcom/squareup/workflow1/internal/InlineLinkedList$InlineListNode; + public final fun getTail ()Lcom/squareup/workflow1/internal/InlineLinkedList$InlineListNode; + public final fun plusAssign (Lcom/squareup/workflow1/internal/InlineLinkedList$InlineListNode;)V + public final fun removeFirst (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/internal/InlineLinkedList$InlineListNode; + public final fun setHead (Lcom/squareup/workflow1/internal/InlineLinkedList$InlineListNode;)V + public final fun setTail (Lcom/squareup/workflow1/internal/InlineLinkedList$InlineListNode;)V +} + +public abstract interface class com/squareup/workflow1/internal/InlineLinkedList$InlineListNode { + public abstract fun getNextListNode ()Lcom/squareup/workflow1/internal/InlineLinkedList$InlineListNode; + public abstract fun setNextListNode (Lcom/squareup/workflow1/internal/InlineLinkedList$InlineListNode;)V +} + +public final class com/squareup/workflow1/internal/RealRenderContext : com/squareup/workflow1/BaseRenderContext, com/squareup/workflow1/Sink { + public fun (Lcom/squareup/workflow1/internal/RealRenderContext$Renderer;Lcom/squareup/workflow1/internal/RealRenderContext$SideEffectRunner;Lkotlinx/coroutines/channels/SendChannel;)V + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function10;)Lkotlin/jvm/functions/Function9; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function11;)Lkotlin/jvm/functions/Function10; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;)Lkotlin/jvm/functions/Function0; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;)Lkotlin/jvm/functions/Function1; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function3;)Lkotlin/jvm/functions/Function2; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function4;)Lkotlin/jvm/functions/Function3; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function5;)Lkotlin/jvm/functions/Function4; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function6;)Lkotlin/jvm/functions/Function5; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function7;)Lkotlin/jvm/functions/Function6; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function8;)Lkotlin/jvm/functions/Function7; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function9;)Lkotlin/jvm/functions/Function8; + public final fun freeze ()V + public fun getActionSink ()Lcom/squareup/workflow1/Sink; + public fun renderChild (Lcom/squareup/workflow1/Workflow;Ljava/lang/Object;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; + public fun runningSideEffect (Ljava/lang/String;Lkotlin/jvm/functions/Function2;)V + public fun send (Lcom/squareup/workflow1/WorkflowAction;)V + public synthetic fun send (Ljava/lang/Object;)V +} + +public abstract interface class com/squareup/workflow1/internal/RealRenderContext$Renderer { + public abstract fun render (Lcom/squareup/workflow1/Workflow;Ljava/lang/Object;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; +} + +public abstract interface class com/squareup/workflow1/internal/RealRenderContext$SideEffectRunner { + public abstract fun runningSideEffect (Ljava/lang/String;Lkotlin/jvm/functions/Function2;)V +} + +public final class com/squareup/workflow1/internal/SideEffectNode : com/squareup/workflow1/internal/InlineLinkedList$InlineListNode { + public fun (Ljava/lang/String;Lkotlinx/coroutines/Job;)V + public final fun getJob ()Lkotlinx/coroutines/Job; + public final fun getKey ()Ljava/lang/String; + public synthetic fun getNextListNode ()Lcom/squareup/workflow1/internal/InlineLinkedList$InlineListNode; + public fun getNextListNode ()Lcom/squareup/workflow1/internal/SideEffectNode; + public synthetic fun setNextListNode (Lcom/squareup/workflow1/internal/InlineLinkedList$InlineListNode;)V + public fun setNextListNode (Lcom/squareup/workflow1/internal/SideEffectNode;)V +} + +public final class com/squareup/workflow1/internal/SubtreeManager : com/squareup/workflow1/internal/RealRenderContext$Renderer { + public fun (Ljava/util/Map;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/WorkflowInterceptor$WorkflowSession;Lcom/squareup/workflow1/WorkflowInterceptor;Lcom/squareup/workflow1/internal/IdCounter;)V + public synthetic fun (Ljava/util/Map;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/WorkflowInterceptor$WorkflowSession;Lcom/squareup/workflow1/WorkflowInterceptor;Lcom/squareup/workflow1/internal/IdCounter;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun commitRenderedChildren ()V + public final fun createChildSnapshots ()Ljava/util/Map; + public fun render (Lcom/squareup/workflow1/Workflow;Ljava/lang/Object;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; + public final fun tickChildren (Lkotlinx/coroutines/selects/SelectBuilder;)V +} + +public final class com/squareup/workflow1/internal/ThrowablesKt { + public static final fun unwrapCancellationCause (Ljava/lang/Throwable;)Ljava/lang/Throwable; +} + +public final class com/squareup/workflow1/internal/WorkflowChildNode : com/squareup/workflow1/internal/InlineLinkedList$InlineListNode { + public fun (Lcom/squareup/workflow1/Workflow;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/internal/WorkflowNode;)V + public final fun acceptChildOutput (Ljava/lang/Object;)Lcom/squareup/workflow1/WorkflowAction; + public final fun getId ()Lcom/squareup/workflow1/internal/WorkflowNodeId; + public synthetic fun getNextListNode ()Lcom/squareup/workflow1/internal/InlineLinkedList$InlineListNode; + public fun getNextListNode ()Lcom/squareup/workflow1/internal/WorkflowChildNode; + public final fun getWorkflow ()Lcom/squareup/workflow1/Workflow; + public final fun getWorkflowNode ()Lcom/squareup/workflow1/internal/WorkflowNode; + public final fun matches (Lcom/squareup/workflow1/Workflow;Ljava/lang/String;)Z + public final fun render (Lcom/squareup/workflow1/StatefulWorkflow;Ljava/lang/Object;)Ljava/lang/Object; + public final fun setHandler (Lkotlin/jvm/functions/Function1;)V + public synthetic fun setNextListNode (Lcom/squareup/workflow1/internal/InlineLinkedList$InlineListNode;)V + public fun setNextListNode (Lcom/squareup/workflow1/internal/WorkflowChildNode;)V +} + +public final class com/squareup/workflow1/internal/WorkflowNode : com/squareup/workflow1/WorkflowInterceptor$WorkflowSession, com/squareup/workflow1/internal/RealRenderContext$SideEffectRunner, kotlinx/coroutines/CoroutineScope { + public fun (Lcom/squareup/workflow1/internal/WorkflowNodeId;Lcom/squareup/workflow1/StatefulWorkflow;Ljava/lang/Object;Lcom/squareup/workflow1/TreeSnapshot;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/WorkflowInterceptor$WorkflowSession;Lcom/squareup/workflow1/WorkflowInterceptor;Lcom/squareup/workflow1/internal/IdCounter;)V + public synthetic fun (Lcom/squareup/workflow1/internal/WorkflowNodeId;Lcom/squareup/workflow1/StatefulWorkflow;Ljava/lang/Object;Lcom/squareup/workflow1/TreeSnapshot;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/WorkflowInterceptor$WorkflowSession;Lcom/squareup/workflow1/WorkflowInterceptor;Lcom/squareup/workflow1/internal/IdCounter;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun cancel (Ljava/util/concurrent/CancellationException;)V + public static synthetic fun cancel$default (Lcom/squareup/workflow1/internal/WorkflowNode;Ljava/util/concurrent/CancellationException;ILjava/lang/Object;)V + public fun getCoroutineContext ()Lkotlin/coroutines/CoroutineContext; + public final fun getId ()Lcom/squareup/workflow1/internal/WorkflowNodeId; + public fun getIdentifier ()Lcom/squareup/workflow1/WorkflowIdentifier; + public fun getParent ()Lcom/squareup/workflow1/WorkflowInterceptor$WorkflowSession; + public fun getRenderKey ()Ljava/lang/String; + public fun getSessionId ()J + public final fun render (Lcom/squareup/workflow1/StatefulWorkflow;Ljava/lang/Object;)Ljava/lang/Object; + public fun runningSideEffect (Ljava/lang/String;Lkotlin/jvm/functions/Function2;)V + public final fun snapshot (Lcom/squareup/workflow1/StatefulWorkflow;)Lcom/squareup/workflow1/TreeSnapshot; + public final fun tick (Lkotlinx/coroutines/selects/SelectBuilder;)V + public fun toString ()Ljava/lang/String; +} + +public final class com/squareup/workflow1/internal/WorkflowNodeId { + public static final field Companion Lcom/squareup/workflow1/internal/WorkflowNodeId$Companion; + public fun (Lcom/squareup/workflow1/Workflow;Ljava/lang/String;)V + public synthetic fun (Lcom/squareup/workflow1/Workflow;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Lcom/squareup/workflow1/WorkflowIdentifier;Ljava/lang/String;)V + public synthetic fun (Lcom/squareup/workflow1/WorkflowIdentifier;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1$wf1_workflow_runtime ()Lcom/squareup/workflow1/WorkflowIdentifier; + public final fun component2$wf1_workflow_runtime ()Ljava/lang/String; + public final fun copy (Lcom/squareup/workflow1/WorkflowIdentifier;Ljava/lang/String;)Lcom/squareup/workflow1/internal/WorkflowNodeId; + public static synthetic fun copy$default (Lcom/squareup/workflow1/internal/WorkflowNodeId;Lcom/squareup/workflow1/WorkflowIdentifier;Ljava/lang/String;ILjava/lang/Object;)Lcom/squareup/workflow1/internal/WorkflowNodeId; + public fun equals (Ljava/lang/Object;)Z + public final fun getIdentifier$wf1_workflow_runtime ()Lcom/squareup/workflow1/WorkflowIdentifier; + public final fun getName$wf1_workflow_runtime ()Ljava/lang/String; + public fun hashCode ()I + public final fun matches (Lcom/squareup/workflow1/Workflow;Ljava/lang/String;)Z + public final fun toByteStringOrNull$wf1_workflow_runtime ()Lokio/ByteString; + public fun toString ()Ljava/lang/String; +} + +public final class com/squareup/workflow1/internal/WorkflowNodeId$Companion { + public final fun parse (Lokio/ByteString;)Lcom/squareup/workflow1/internal/WorkflowNodeId; +} + +public final class com/squareup/workflow1/internal/WorkflowNodeIdKt { + public static final fun id (Lcom/squareup/workflow1/Workflow;Ljava/lang/String;)Lcom/squareup/workflow1/internal/WorkflowNodeId; + public static synthetic fun id$default (Lcom/squareup/workflow1/Workflow;Ljava/lang/String;ILjava/lang/Object;)Lcom/squareup/workflow1/internal/WorkflowNodeId; +} + +public final class com/squareup/workflow1/internal/WorkflowRunner { + public fun (Lkotlinx/coroutines/CoroutineScope;Lcom/squareup/workflow1/Workflow;Lkotlinx/coroutines/flow/StateFlow;Lcom/squareup/workflow1/TreeSnapshot;Lcom/squareup/workflow1/WorkflowInterceptor;)V + public final fun cancelRuntime (Ljava/util/concurrent/CancellationException;)V + public static synthetic fun cancelRuntime$default (Lcom/squareup/workflow1/internal/WorkflowRunner;Ljava/util/concurrent/CancellationException;ILjava/lang/Object;)V + public final fun nextOutput (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun nextRendering ()Lcom/squareup/workflow1/RenderingAndSnapshot; +} + diff --git a/workflow-rx2/api/workflow-rx2.api b/workflow-rx2/api/workflow-rx2.api index 5bc5774514..45add34c62 100644 --- a/workflow-rx2/api/workflow-rx2.api +++ b/workflow-rx2/api/workflow-rx2.api @@ -7,5 +7,9 @@ public abstract class com/squareup/workflow1/rx2/PublisherWorker : com/squareup/ public final class com/squareup/workflow1/rx2/RxWorkersKt { public static final fun asWorker (Lio/reactivex/Completable;)Lcom/squareup/workflow1/Worker; + public static final synthetic fun asWorker (Lio/reactivex/Maybe;)Lcom/squareup/workflow1/Worker; + public static final synthetic fun asWorker (Lio/reactivex/Observable;)Lcom/squareup/workflow1/Worker; + public static final synthetic fun asWorker (Lio/reactivex/Single;)Lcom/squareup/workflow1/Worker; + public static final synthetic fun asWorker (Lorg/reactivestreams/Publisher;)Lcom/squareup/workflow1/Worker; } diff --git a/workflow-testing/api/workflow-testing.api b/workflow-testing/api/workflow-testing.api index 4ed0798274..af951f6e7a 100644 --- a/workflow-testing/api/workflow-testing.api +++ b/workflow-testing/api/workflow-testing.api @@ -1,3 +1,92 @@ +public final class com/squareup/workflow1/testing/RealRenderTester : com/squareup/workflow1/testing/RenderTester, com/squareup/workflow1/BaseRenderContext, com/squareup/workflow1/Sink, com/squareup/workflow1/testing/RenderTestResult { + public fun (Lcom/squareup/workflow1/StatefulWorkflow;Ljava/lang/Object;Ljava/lang/Object;Ljava/util/List;Ljava/util/List;ZLcom/squareup/workflow1/WorkflowAction;Ljava/util/List;Ljava/util/List;)V + public synthetic fun (Lcom/squareup/workflow1/StatefulWorkflow;Ljava/lang/Object;Ljava/lang/Object;Ljava/util/List;Ljava/util/List;ZLcom/squareup/workflow1/WorkflowAction;Ljava/util/List;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function10;)Lkotlin/jvm/functions/Function9; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function11;)Lkotlin/jvm/functions/Function10; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;)Lkotlin/jvm/functions/Function0; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;)Lkotlin/jvm/functions/Function1; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function3;)Lkotlin/jvm/functions/Function2; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function4;)Lkotlin/jvm/functions/Function3; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function5;)Lkotlin/jvm/functions/Function4; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function6;)Lkotlin/jvm/functions/Function5; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function7;)Lkotlin/jvm/functions/Function6; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function8;)Lkotlin/jvm/functions/Function7; + public fun eventHandler (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function9;)Lkotlin/jvm/functions/Function8; + public fun expectSideEffect (Ljava/lang/String;ZLkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/testing/RenderTester; + public fun expectWorkflow$wf1_workflow_testing (Ljava/lang/String;ZLkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/testing/RenderTester; + public fun getActionSink ()Lcom/squareup/workflow1/Sink; + public fun render (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/testing/RenderTestResult; + public fun renderChild (Lcom/squareup/workflow1/Workflow;Ljava/lang/Object;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; + public fun requireExplicitWorkerExpectations ()Lcom/squareup/workflow1/testing/RenderTester; + public fun runningSideEffect (Ljava/lang/String;Lkotlin/jvm/functions/Function2;)V + public fun send (Lcom/squareup/workflow1/WorkflowAction;)V + public synthetic fun send (Ljava/lang/Object;)V + public fun testNextRender ()Lcom/squareup/workflow1/testing/RenderTester; + public fun testNextRenderWithProps (Ljava/lang/Object;)Lcom/squareup/workflow1/testing/RenderTester; + public fun verifyAction (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/testing/RenderTestResult; + public fun verifyActionResult (Lkotlin/jvm/functions/Function2;)Lcom/squareup/workflow1/testing/RenderTestResult; +} + +public abstract class com/squareup/workflow1/testing/RealRenderTester$Expectation { + public abstract fun describe ()Ljava/lang/String; + public fun getOutput ()Lcom/squareup/workflow1/WorkflowOutput; +} + +public final class com/squareup/workflow1/testing/RealRenderTester$Expectation$ExpectedSideEffect : com/squareup/workflow1/testing/RealRenderTester$Expectation { + public fun (Lkotlin/jvm/functions/Function1;ZLjava/lang/String;)V + public final fun component1 ()Lkotlin/jvm/functions/Function1; + public final fun component2 ()Z + public final fun component3 ()Ljava/lang/String; + public final fun copy (Lkotlin/jvm/functions/Function1;ZLjava/lang/String;)Lcom/squareup/workflow1/testing/RealRenderTester$Expectation$ExpectedSideEffect; + public static synthetic fun copy$default (Lcom/squareup/workflow1/testing/RealRenderTester$Expectation$ExpectedSideEffect;Lkotlin/jvm/functions/Function1;ZLjava/lang/String;ILjava/lang/Object;)Lcom/squareup/workflow1/testing/RealRenderTester$Expectation$ExpectedSideEffect; + public fun describe ()Ljava/lang/String; + public fun equals (Ljava/lang/Object;)Z + public final fun getDescription ()Ljava/lang/String; + public final fun getExactMatch ()Z + public final fun getMatcher ()Lkotlin/jvm/functions/Function1; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/squareup/workflow1/testing/RealRenderTester$Expectation$ExpectedWorker : com/squareup/workflow1/testing/RealRenderTester$Expectation { + public fun (Lkotlin/jvm/functions/Function1;Ljava/lang/String;Lcom/squareup/workflow1/WorkflowOutput;Ljava/lang/String;)V + public final fun component1 ()Lkotlin/jvm/functions/Function1; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Lcom/squareup/workflow1/WorkflowOutput; + public final fun component4 ()Ljava/lang/String; + public final fun copy (Lkotlin/jvm/functions/Function1;Ljava/lang/String;Lcom/squareup/workflow1/WorkflowOutput;Ljava/lang/String;)Lcom/squareup/workflow1/testing/RealRenderTester$Expectation$ExpectedWorker; + public static synthetic fun copy$default (Lcom/squareup/workflow1/testing/RealRenderTester$Expectation$ExpectedWorker;Lkotlin/jvm/functions/Function1;Ljava/lang/String;Lcom/squareup/workflow1/WorkflowOutput;Ljava/lang/String;ILjava/lang/Object;)Lcom/squareup/workflow1/testing/RealRenderTester$Expectation$ExpectedWorker; + public fun describe ()Ljava/lang/String; + public fun equals (Ljava/lang/Object;)Z + public final fun getDescription ()Ljava/lang/String; + public final fun getKey ()Ljava/lang/String; + public final fun getMatchesWhen ()Lkotlin/jvm/functions/Function1; + public fun getOutput ()Lcom/squareup/workflow1/WorkflowOutput; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/squareup/workflow1/testing/RealRenderTester$Expectation$ExpectedWorkflow : com/squareup/workflow1/testing/RealRenderTester$Expectation { + public fun (Lkotlin/jvm/functions/Function1;ZLjava/lang/String;)V + public final fun component1 ()Lkotlin/jvm/functions/Function1; + public final fun component2 ()Z + public final fun component3 ()Ljava/lang/String; + public final fun copy (Lkotlin/jvm/functions/Function1;ZLjava/lang/String;)Lcom/squareup/workflow1/testing/RealRenderTester$Expectation$ExpectedWorkflow; + public static synthetic fun copy$default (Lcom/squareup/workflow1/testing/RealRenderTester$Expectation$ExpectedWorkflow;Lkotlin/jvm/functions/Function1;ZLjava/lang/String;ILjava/lang/Object;)Lcom/squareup/workflow1/testing/RealRenderTester$Expectation$ExpectedWorkflow; + public fun describe ()Ljava/lang/String; + public fun equals (Ljava/lang/Object;)Z + public final fun getDescription ()Ljava/lang/String; + public final fun getExactMatch ()Z + public final fun getMatcher ()Lkotlin/jvm/functions/Function1; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/squareup/workflow1/testing/RealRenderTesterKt { + public static final fun createRenderChildInvocation (Lcom/squareup/workflow1/Workflow;Ljava/lang/Object;Ljava/lang/String;)Lcom/squareup/workflow1/testing/RenderTester$RenderChildInvocation; + public static final fun realTypeMatchesExpectation (Lcom/squareup/workflow1/WorkflowIdentifier;Lcom/squareup/workflow1/WorkflowIdentifier;)Z +} + public final class com/squareup/workflow1/testing/RenderIdempotencyChecker : com/squareup/workflow1/WorkflowInterceptor { public static final field INSTANCE Lcom/squareup/workflow1/testing/RenderIdempotencyChecker; public fun onInitialState (Ljava/lang/Object;Lcom/squareup/workflow1/Snapshot;Lkotlin/jvm/functions/Function2;Lcom/squareup/workflow1/WorkflowInterceptor$WorkflowSession;)Ljava/lang/Object; @@ -18,6 +107,8 @@ public abstract class com/squareup/workflow1/testing/RenderTester { public fun ()V public abstract fun expectSideEffect (Ljava/lang/String;ZLkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/testing/RenderTester; public static synthetic fun expectSideEffect$default (Lcom/squareup/workflow1/testing/RenderTester;Ljava/lang/String;ZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/squareup/workflow1/testing/RenderTester; + public abstract fun expectWorkflow$wf1_workflow_testing (Ljava/lang/String;ZLkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/testing/RenderTester; + public static synthetic fun expectWorkflow$wf1_workflow_testing$default (Lcom/squareup/workflow1/testing/RenderTester;Ljava/lang/String;ZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/squareup/workflow1/testing/RenderTester; public abstract fun render (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/testing/RenderTestResult; public static synthetic fun render$default (Lcom/squareup/workflow1/testing/RenderTester;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/squareup/workflow1/testing/RenderTestResult; public abstract fun requireExplicitWorkerExpectations ()Lcom/squareup/workflow1/testing/RenderTester; @@ -59,8 +150,12 @@ public final class com/squareup/workflow1/testing/RenderTesterKt { } public final class com/squareup/workflow1/testing/RenderTesterWorkersKt { + public static final synthetic fun expectWorker (Lcom/squareup/workflow1/testing/RenderTester;Lcom/squareup/workflow1/Worker;Ljava/lang/String;Lcom/squareup/workflow1/WorkflowOutput;Ljava/lang/String;)Lcom/squareup/workflow1/testing/RenderTester; + public static final fun expectWorker (Lcom/squareup/workflow1/testing/RenderTester;Ljava/lang/String;Lcom/squareup/workflow1/WorkflowOutput;ZLkotlin/jvm/functions/Function3;)Lcom/squareup/workflow1/testing/RenderTester; public static final fun expectWorker (Lcom/squareup/workflow1/testing/RenderTester;Lkotlin/reflect/KClass;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/WorkflowOutput;Ljava/lang/String;)Lcom/squareup/workflow1/testing/RenderTester; public static final fun expectWorker (Lcom/squareup/workflow1/testing/RenderTester;Lkotlin/reflect/KType;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/WorkflowOutput;Ljava/lang/String;)Lcom/squareup/workflow1/testing/RenderTester; + public static synthetic fun expectWorker$default (Lcom/squareup/workflow1/testing/RenderTester;Lcom/squareup/workflow1/Worker;Ljava/lang/String;Lcom/squareup/workflow1/WorkflowOutput;Ljava/lang/String;ILjava/lang/Object;)Lcom/squareup/workflow1/testing/RenderTester; + public static synthetic fun expectWorker$default (Lcom/squareup/workflow1/testing/RenderTester;Ljava/lang/String;Lcom/squareup/workflow1/WorkflowOutput;ZLkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lcom/squareup/workflow1/testing/RenderTester; public static synthetic fun expectWorker$default (Lcom/squareup/workflow1/testing/RenderTester;Lkotlin/reflect/KClass;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/WorkflowOutput;Ljava/lang/String;ILjava/lang/Object;)Lcom/squareup/workflow1/testing/RenderTester; public static synthetic fun expectWorker$default (Lcom/squareup/workflow1/testing/RenderTester;Lkotlin/reflect/KType;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/WorkflowOutput;Ljava/lang/String;ILjava/lang/Object;)Lcom/squareup/workflow1/testing/RenderTester; public static final fun expectWorkerOutputting (Lcom/squareup/workflow1/testing/RenderTester;Lkotlin/reflect/KType;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/WorkflowOutput;Ljava/lang/String;)Lcom/squareup/workflow1/testing/RenderTester; @@ -76,6 +171,10 @@ public final class com/squareup/workflow1/testing/WorkerSink : com/squareup/work public fun toString ()Ljava/lang/String; } +public final class com/squareup/workflow1/testing/WorkerSinkKt { + public static final synthetic fun WorkerSink (Ljava/lang/String;)Lcom/squareup/workflow1/testing/WorkerSink; +} + public abstract interface class com/squareup/workflow1/testing/WorkerTester { public abstract fun assertFinished (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public abstract fun assertNoOutput ()V @@ -90,6 +189,10 @@ public final class com/squareup/workflow1/testing/WorkerTesterKt { public static synthetic fun test$default (Lcom/squareup/workflow1/Worker;JLkotlin/jvm/functions/Function2;ILjava/lang/Object;)V } +public final class com/squareup/workflow1/testing/WorkerWorkflowHelperKt { + public static final fun workerWorkflowWorkerTypeOrNull (Lcom/squareup/workflow1/Workflow;)Lkotlin/reflect/KType; +} + public final class com/squareup/workflow1/testing/WorkflowTestParams { public fun ()V public fun (Lcom/squareup/workflow1/testing/WorkflowTestParams$StartMode;Z)V @@ -123,12 +226,14 @@ public final class com/squareup/workflow1/testing/WorkflowTestParams$StartMode$S public final class com/squareup/workflow1/testing/WorkflowTestRuntime { public static final field Companion Lcom/squareup/workflow1/testing/WorkflowTestRuntime$Companion; public static final field DEFAULT_TIMEOUT_MS J + public fun (Lkotlinx/coroutines/flow/MutableStateFlow;Lkotlinx/coroutines/flow/Flow;Lkotlinx/coroutines/channels/ReceiveChannel;)V public final fun awaitNextOutput (Ljava/lang/Long;)Ljava/lang/Object; public static synthetic fun awaitNextOutput$default (Lcom/squareup/workflow1/testing/WorkflowTestRuntime;Ljava/lang/Long;ILjava/lang/Object;)Ljava/lang/Object; public final fun awaitNextRendering (Ljava/lang/Long;Z)Ljava/lang/Object; public static synthetic fun awaitNextRendering$default (Lcom/squareup/workflow1/testing/WorkflowTestRuntime;Ljava/lang/Long;ZILjava/lang/Object;)Ljava/lang/Object; public final fun awaitNextSnapshot (Ljava/lang/Long;Z)Lcom/squareup/workflow1/TreeSnapshot; public static synthetic fun awaitNextSnapshot$default (Lcom/squareup/workflow1/testing/WorkflowTestRuntime;Ljava/lang/Long;ZILjava/lang/Object;)Lcom/squareup/workflow1/TreeSnapshot; + public final fun collectFromWorkflowIn$wf1_workflow_testing (Lkotlinx/coroutines/CoroutineScope;)V public final fun getHasOutput ()Z public final fun getHasRendering ()Z public final fun getHasSnapshot ()Z diff --git a/workflow-tracing/api/workflow-tracing.api b/workflow-tracing/api/workflow-tracing.api index 06036c84af..bdce09a3c4 100644 --- a/workflow-tracing/api/workflow-tracing.api +++ b/workflow-tracing/api/workflow-tracing.api @@ -1,3 +1,11 @@ +public class com/squareup/workflow1/diagnostic/tracing/GcDetector { + public fun (Lkotlin/jvm/functions/Function0;)V + public final fun stop ()V +} + +public final class com/squareup/workflow1/diagnostic/tracing/GcDetectorKt { +} + public abstract interface class com/squareup/workflow1/diagnostic/tracing/MemoryStats { public abstract fun freeMemory ()J public abstract fun totalMemory ()J @@ -10,6 +18,7 @@ public final class com/squareup/workflow1/diagnostic/tracing/RuntimeMemoryStats } public final class com/squareup/workflow1/diagnostic/tracing/TracingWorkflowInterceptor : com/squareup/workflow1/WorkflowInterceptor { + public fun (Lcom/squareup/workflow1/diagnostic/tracing/MemoryStats;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)V public fun (Lcom/squareup/workflow1/diagnostic/tracing/MemoryStats;Lkotlin/jvm/functions/Function2;)V public synthetic fun (Lcom/squareup/workflow1/diagnostic/tracing/MemoryStats;Lkotlin/jvm/functions/Function2;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public fun onInitialState (Ljava/lang/Object;Lcom/squareup/workflow1/Snapshot;Lkotlin/jvm/functions/Function2;Lcom/squareup/workflow1/WorkflowInterceptor$WorkflowSession;)Ljava/lang/Object; @@ -24,5 +33,6 @@ public final class com/squareup/workflow1/diagnostic/tracing/TracingWorkflowInte public static final fun TracingWorkflowInterceptor (Ljava/lang/String;Lcom/squareup/workflow1/diagnostic/tracing/MemoryStats;Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/diagnostic/tracing/TracingWorkflowInterceptor; public static synthetic fun TracingWorkflowInterceptor$default (Ljava/io/File;Ljava/lang/String;ILjava/lang/Object;)Lcom/squareup/workflow1/diagnostic/tracing/TracingWorkflowInterceptor; public static synthetic fun TracingWorkflowInterceptor$default (Ljava/lang/String;Lcom/squareup/workflow1/diagnostic/tracing/MemoryStats;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/squareup/workflow1/diagnostic/tracing/TracingWorkflowInterceptor; + public static final fun provideLogger (Ljava/lang/String;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/squareup/tracing/TraceLogger; } diff --git a/workflow-ui/compose-tooling/api/compose-tooling.api b/workflow-ui/compose-tooling/api/compose-tooling.api index e45d0fb7e5..f6394adff0 100644 --- a/workflow-ui/compose-tooling/api/compose-tooling.api +++ b/workflow-ui/compose-tooling/api/compose-tooling.api @@ -5,6 +5,14 @@ public final class com/squareup/workflow1/ui/compose/tooling/ComposableSingleton public final fun getLambda-1$wf1_compose_tooling ()Lkotlin/jvm/functions/Function4; } +public final class com/squareup/workflow1/ui/compose/tooling/PlaceholderViewFactoryKt { + public static final fun placeholderViewFactory (Landroidx/compose/ui/Modifier;)Lcom/squareup/workflow1/ui/ViewFactory; +} + +public final class com/squareup/workflow1/ui/compose/tooling/PreviewViewEnvironmentKt { + public static final fun previewViewEnvironment (Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/ui/ViewFactory;Landroidx/compose/runtime/Composer;II)Lcom/squareup/workflow1/ui/ViewEnvironment; +} + public final class com/squareup/workflow1/ui/compose/tooling/ViewFactoriesKt { public static final fun Preview (Lcom/squareup/workflow1/ui/ViewFactory;Ljava/lang/Object;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;II)V } diff --git a/workflow-ui/compose-tooling/build.gradle.kts b/workflow-ui/compose-tooling/build.gradle.kts index 7464797eed..943d106694 100644 --- a/workflow-ui/compose-tooling/build.gradle.kts +++ b/workflow-ui/compose-tooling/build.gradle.kts @@ -18,7 +18,7 @@ apply(from = rootProject.file(".buildscript/android-ui-tests.gradle")) android { buildFeatures.compose = true composeOptions { - kotlinCompilerExtensionVersion = "1.0.1" + kotlinCompilerExtensionVersion = "1.1.0-rc02" } } diff --git a/workflow-ui/compose/api/compose.api b/workflow-ui/compose/api/compose.api index f0a8b52aed..12c4480f41 100644 --- a/workflow-ui/compose/api/compose.api +++ b/workflow-ui/compose/api/compose.api @@ -1,4 +1,5 @@ public abstract interface class com/squareup/workflow1/ui/compose/ComposeRendering : com/squareup/workflow1/ui/AndroidViewRendering { + public static final synthetic field Companion Lcom/squareup/workflow1/ui/compose/ComposeRendering$Companion; public abstract fun Content (Lcom/squareup/workflow1/ui/ViewEnvironment;Landroidx/compose/runtime/Composer;I)V public abstract fun getViewFactory ()Lcom/squareup/workflow1/ui/ViewFactory; } @@ -19,16 +20,19 @@ public abstract class com/squareup/workflow1/ui/compose/ComposeViewFactory : com } public final class com/squareup/workflow1/ui/compose/ComposeViewFactoryKt { + public static final synthetic fun composeViewFactory (Lkotlin/jvm/functions/Function4;)Lcom/squareup/workflow1/ui/ViewFactory; public static final fun composeViewFactory (Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function4;)Lcom/squareup/workflow1/ui/ViewFactory; } public final class com/squareup/workflow1/ui/compose/CompositionRootKt { + public static final fun WrappedWithRootIfNecessary (Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V public static final fun withCompositionRoot (Lcom/squareup/workflow1/ui/ViewEnvironment;Lkotlin/jvm/functions/Function3;)Lcom/squareup/workflow1/ui/ViewEnvironment; public static final fun withCompositionRoot (Lcom/squareup/workflow1/ui/ViewRegistry;Lkotlin/jvm/functions/Function3;)Lcom/squareup/workflow1/ui/ViewRegistry; } public final class com/squareup/workflow1/ui/compose/RenderAsStateKt { public static final fun renderAsState (Lcom/squareup/workflow1/Workflow;Ljava/lang/Object;Ljava/util/List;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)Landroidx/compose/runtime/State; + public static final fun renderAsState (Lcom/squareup/workflow1/Workflow;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/Object;Ljava/util/List;Lkotlin/jvm/functions/Function2;Ljava/lang/String;Landroidx/compose/runtime/Composer;II)Landroidx/compose/runtime/State; } public final class com/squareup/workflow1/ui/compose/TextControllerAsMutableStateKt { diff --git a/workflow-ui/compose/build.gradle.kts b/workflow-ui/compose/build.gradle.kts index 24ba17d826..7e5a69455c 100644 --- a/workflow-ui/compose/build.gradle.kts +++ b/workflow-ui/compose/build.gradle.kts @@ -18,7 +18,7 @@ apply(from = rootProject.file(".buildscript/android-ui-tests.gradle")) android { buildFeatures.compose = true composeOptions { - kotlinCompilerExtensionVersion = "1.0.1" + kotlinCompilerExtensionVersion = "1.1.0-rc02" } } diff --git a/workflow-ui/container-android/api/container-android.api b/workflow-ui/container-android/api/container-android.api index db97d77857..a8c9940de1 100644 --- a/workflow-ui/container-android/api/container-android.api +++ b/workflow-ui/container-android/api/container-android.api @@ -34,15 +34,40 @@ public final class com/squareup/workflow1/ui/backstack/BackStackContainer$Compan } public final class com/squareup/workflow1/ui/backstack/BackStackStateKeyKt { + public static final fun getGetBackStackStateKeyPrefix (Lcom/squareup/workflow1/ui/ViewEnvironment;)Ljava/lang/String; public static final fun withBackStackStateKeyPrefix (Lcom/squareup/workflow1/ui/ViewEnvironment;Ljava/lang/String;)Lcom/squareup/workflow1/ui/ViewEnvironment; } +public final class com/squareup/workflow1/ui/backstack/KeyedStateRegistryOwner : androidx/lifecycle/LifecycleOwner, androidx/savedstate/SavedStateRegistryOwner { + public static final field Companion Lcom/squareup/workflow1/ui/backstack/KeyedStateRegistryOwner$Companion; + public synthetic fun (Ljava/lang/String;Landroidx/lifecycle/LifecycleOwner;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getController ()Landroidx/savedstate/SavedStateRegistryController; + public final fun getKey ()Ljava/lang/String; + public fun getLifecycle ()Landroidx/lifecycle/Lifecycle; + public fun getSavedStateRegistry ()Landroidx/savedstate/SavedStateRegistry; +} + +public final class com/squareup/workflow1/ui/backstack/KeyedStateRegistryOwner$Companion { + public final fun installAsSavedStateRegistryOwnerOn (Landroid/view/View;Ljava/lang/String;)Lcom/squareup/workflow1/ui/backstack/KeyedStateRegistryOwner; +} + +public final class com/squareup/workflow1/ui/backstack/StateRegistryAggregator { + public fun (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V + public final fun attachToParentRegistry (Ljava/lang/String;Landroidx/savedstate/SavedStateRegistryOwner;)V + public final fun detachFromParentRegistry ()V + public final fun pruneKeys (Ljava/util/Collection;)V + public final fun restoreRegistryControllerIfReady (Ljava/lang/String;Landroidx/savedstate/SavedStateRegistryController;)V + public final fun saveRegistryController (Ljava/lang/String;Landroidx/savedstate/SavedStateRegistryController;)V +} + public final class com/squareup/workflow1/ui/backstack/ViewStateCache : android/os/Parcelable { public static final field CREATOR Lcom/squareup/workflow1/ui/backstack/ViewStateCache$CREATOR; public fun ()V + public fun (Ljava/util/Map;)V public final fun attachToParentRegistry (Ljava/lang/String;Landroidx/savedstate/SavedStateRegistryOwner;)V public fun describeContents ()I public final fun detachFromParentRegistry ()V + public final fun getViewStates$wf1_container_android ()Ljava/util/Map; public final fun prune (Ljava/util/Collection;)V public final fun restore (Lcom/squareup/workflow1/ui/backstack/ViewStateCache;)V public final fun update (Ljava/util/Collection;Landroid/view/View;Landroid/view/View;)V @@ -71,6 +96,32 @@ public final class com/squareup/workflow1/ui/backstack/ViewStateCache$SavedState public synthetic fun newArray (I)[Ljava/lang/Object; } +public final class com/squareup/workflow1/ui/backstack/ViewStateCacheKt { +} + +public final class com/squareup/workflow1/ui/backstack/ViewStateFrame : android/os/Parcelable { + public static final field CREATOR Lcom/squareup/workflow1/ui/backstack/ViewStateFrame$CREATOR; + public fun (Ljava/lang/String;Landroid/util/SparseArray;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Landroid/util/SparseArray; + public final fun copy (Ljava/lang/String;Landroid/util/SparseArray;)Lcom/squareup/workflow1/ui/backstack/ViewStateFrame; + public static synthetic fun copy$default (Lcom/squareup/workflow1/ui/backstack/ViewStateFrame;Ljava/lang/String;Landroid/util/SparseArray;ILjava/lang/Object;)Lcom/squareup/workflow1/ui/backstack/ViewStateFrame; + public fun describeContents ()I + public fun equals (Ljava/lang/Object;)Z + public final fun getKey ()Ljava/lang/String; + public final fun getViewState ()Landroid/util/SparseArray; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public fun writeToParcel (Landroid/os/Parcel;I)V +} + +public final class com/squareup/workflow1/ui/backstack/ViewStateFrame$CREATOR : android/os/Parcelable$Creator { + public fun createFromParcel (Landroid/os/Parcel;)Lcom/squareup/workflow1/ui/backstack/ViewStateFrame; + public synthetic fun createFromParcel (Landroid/os/Parcel;)Ljava/lang/Object; + public fun newArray (I)[Lcom/squareup/workflow1/ui/backstack/ViewStateFrame; + public synthetic fun newArray (I)[Ljava/lang/Object; +} + public final class com/squareup/workflow1/ui/modal/AlertContainer : com/squareup/workflow1/ui/modal/ModalContainer { public static final field Companion Lcom/squareup/workflow1/ui/modal/AlertContainer$Companion; public fun (Landroid/content/Context;)V @@ -112,15 +163,44 @@ protected final class com/squareup/workflow1/ui/modal/ModalContainer$DialogRef { public final fun component4 ()Ljava/lang/Object; public final fun copy (Ljava/lang/Object;Lcom/squareup/workflow1/ui/ViewEnvironment;Landroid/app/Dialog;Ljava/lang/Object;)Lcom/squareup/workflow1/ui/modal/ModalContainer$DialogRef; public static synthetic fun copy$default (Lcom/squareup/workflow1/ui/modal/ModalContainer$DialogRef;Ljava/lang/Object;Lcom/squareup/workflow1/ui/ViewEnvironment;Landroid/app/Dialog;Ljava/lang/Object;ILjava/lang/Object;)Lcom/squareup/workflow1/ui/modal/ModalContainer$DialogRef; + public final fun dismiss$wf1_container_android ()V public fun equals (Ljava/lang/Object;)Z public final fun getDialog ()Landroid/app/Dialog; public final fun getExtra ()Ljava/lang/Object; public final fun getModalRendering ()Ljava/lang/Object; public final fun getViewEnvironment ()Lcom/squareup/workflow1/ui/ViewEnvironment; public fun hashCode ()I + public final fun restore$wf1_container_android (Lcom/squareup/workflow1/ui/modal/ModalContainer$KeyAndBundle;)V + public final fun save$wf1_container_android ()Lcom/squareup/workflow1/ui/modal/ModalContainer$KeyAndBundle; public fun toString ()Ljava/lang/String; } +public final class com/squareup/workflow1/ui/modal/ModalContainer$KeyAndBundle : android/os/Parcelable { + public static final field CREATOR Lcom/squareup/workflow1/ui/modal/ModalContainer$KeyAndBundle$CREATOR; + public fun (Ljava/lang/String;Landroid/os/Bundle;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Landroid/os/Bundle; + public final fun copy (Ljava/lang/String;Landroid/os/Bundle;)Lcom/squareup/workflow1/ui/modal/ModalContainer$KeyAndBundle; + public static synthetic fun copy$default (Lcom/squareup/workflow1/ui/modal/ModalContainer$KeyAndBundle;Ljava/lang/String;Landroid/os/Bundle;ILjava/lang/Object;)Lcom/squareup/workflow1/ui/modal/ModalContainer$KeyAndBundle; + public fun describeContents ()I + public fun equals (Ljava/lang/Object;)Z + public final fun getBundle ()Landroid/os/Bundle; + public final fun getCompatibilityKey ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public fun writeToParcel (Landroid/os/Parcel;I)V +} + +public final class com/squareup/workflow1/ui/modal/ModalContainer$KeyAndBundle$CREATOR : android/os/Parcelable$Creator { + public fun createFromParcel (Landroid/os/Parcel;)Lcom/squareup/workflow1/ui/modal/ModalContainer$KeyAndBundle; + public synthetic fun createFromParcel (Landroid/os/Parcel;)Ljava/lang/Object; + public fun newArray (I)[Lcom/squareup/workflow1/ui/modal/ModalContainer$KeyAndBundle; + public synthetic fun newArray (I)[Ljava/lang/Object; +} + +public final class com/squareup/workflow1/ui/modal/ModalContainerKt { +} + public class com/squareup/workflow1/ui/modal/ModalViewContainer : com/squareup/workflow1/ui/modal/ModalContainer { public static final field Companion Lcom/squareup/workflow1/ui/modal/ModalViewContainer$Companion; public fun (Landroid/content/Context;)V @@ -134,6 +214,8 @@ public class com/squareup/workflow1/ui/modal/ModalViewContainer : com/squareup/w } public final class com/squareup/workflow1/ui/modal/ModalViewContainer$Companion { + public final synthetic fun binding (I)Lcom/squareup/workflow1/ui/ViewFactory; + public static synthetic fun binding$default (Lcom/squareup/workflow1/ui/modal/ModalViewContainer$Companion;IILjava/lang/Object;)Lcom/squareup/workflow1/ui/ViewFactory; } public final class com/squareup/workflow1/ui/modal/ModalViewContainer$ModalViewFactory : com/squareup/workflow1/ui/ViewFactory { diff --git a/workflow-ui/core-android/api/core-android.api b/workflow-ui/core-android/api/core-android.api index 41a55c388b..55a76c083a 100644 --- a/workflow-ui/core-android/api/core-android.api +++ b/workflow-ui/core-android/api/core-android.api @@ -23,6 +23,16 @@ public final class com/squareup/workflow1/ui/BuilderViewFactory : com/squareup/w public fun getType ()Lkotlin/reflect/KClass; } +public final class com/squareup/workflow1/ui/CompositeViewRegistry : com/squareup/workflow1/ui/ViewRegistry { + public static final field Companion Lcom/squareup/workflow1/ui/CompositeViewRegistry$Companion; + public fun ([Lcom/squareup/workflow1/ui/ViewRegistry;)V + public fun getFactoryFor (Lkotlin/reflect/KClass;)Lcom/squareup/workflow1/ui/ViewFactory; + public fun getKeys ()Ljava/util/Set; +} + +public final class com/squareup/workflow1/ui/CompositeViewRegistry$Companion { +} + public final class com/squareup/workflow1/ui/DecorativeViewFactory : com/squareup/workflow1/ui/ViewFactory { public fun (Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/ui/ViewStarter;Lkotlin/jvm/functions/Function4;)V public synthetic fun (Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/ui/ViewStarter;Lkotlin/jvm/functions/Function4;ILkotlin/jvm/internal/DefaultConstructorMarker;)V @@ -43,6 +53,14 @@ public abstract interface class com/squareup/workflow1/ui/LayoutRunner { } public final class com/squareup/workflow1/ui/LayoutRunner$Companion { + public final synthetic fun bind (ILkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/ViewFactory; + public final synthetic fun bind (Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/ViewFactory; + public final synthetic fun bind (Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;)Lcom/squareup/workflow1/ui/ViewFactory; + public final synthetic fun bindNoRunner (I)Lcom/squareup/workflow1/ui/ViewFactory; +} + +public final class com/squareup/workflow1/ui/LayoutRunnerKt { + public static final fun viewBindingLayoutInflater (Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/LayoutInflater; } public final class com/squareup/workflow1/ui/LayoutRunnerViewFactory : com/squareup/workflow1/ui/ViewFactory { @@ -51,7 +69,31 @@ public final class com/squareup/workflow1/ui/LayoutRunnerViewFactory : com/squar public fun getType ()Lkotlin/reflect/KClass; } +public final class com/squareup/workflow1/ui/NamedViewFactory : com/squareup/workflow1/ui/ViewFactory { + public static final field INSTANCE Lcom/squareup/workflow1/ui/NamedViewFactory; + public fun buildView (Lcom/squareup/workflow1/ui/Named;Lcom/squareup/workflow1/ui/ViewEnvironment;Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/View; + public synthetic fun buildView (Ljava/lang/Object;Lcom/squareup/workflow1/ui/ViewEnvironment;Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/View; + public fun getType ()Lkotlin/reflect/KClass; +} + +public final class com/squareup/workflow1/ui/PickledTreesnapshot : android/os/Parcelable { + public static final field CREATOR Lcom/squareup/workflow1/ui/PickledTreesnapshot$CREATOR; + public fun (Lcom/squareup/workflow1/TreeSnapshot;)V + public fun describeContents ()I + public final fun getSnapshot$wf1_core_android ()Lcom/squareup/workflow1/TreeSnapshot; + public fun writeToParcel (Landroid/os/Parcel;I)V +} + +public final class com/squareup/workflow1/ui/PickledTreesnapshot$CREATOR : android/os/Parcelable$Creator { + public fun createFromParcel (Landroid/os/Parcel;)Lcom/squareup/workflow1/ui/PickledTreesnapshot; + public synthetic fun createFromParcel (Landroid/os/Parcel;)Ljava/lang/Object; + public fun newArray (I)[Lcom/squareup/workflow1/ui/PickledTreesnapshot; + public synthetic fun newArray (I)[Ljava/lang/Object; +} + public final class com/squareup/workflow1/ui/SnapshotParcelsKt { + public static final synthetic fun toParcelable (Lcom/squareup/workflow1/Snapshot;)Landroid/os/Parcelable; + public static final synthetic fun toParcelable (Lokio/ByteString;)Landroid/os/Parcelable; public static final fun toSnapshot (Landroid/os/Parcelable;)Lcom/squareup/workflow1/Snapshot; } @@ -59,6 +101,27 @@ public final class com/squareup/workflow1/ui/TextControllerControlEditTextKt { public static final fun control (Lcom/squareup/workflow1/ui/TextController;Landroid/widget/EditText;)V } +public abstract interface class com/squareup/workflow1/ui/TreeSnapshotSaver { + public static final field Companion Lcom/squareup/workflow1/ui/TreeSnapshotSaver$Companion; + public abstract fun consumeSnapshot ()Lcom/squareup/workflow1/TreeSnapshot; + public abstract fun registerSource (Lcom/squareup/workflow1/ui/TreeSnapshotSaver$HasTreeSnapshot;)V +} + +public final class com/squareup/workflow1/ui/TreeSnapshotSaver$Companion { + public final fun fromSavedStateRegistry (Landroidx/savedstate/SavedStateRegistry;)Lcom/squareup/workflow1/ui/TreeSnapshotSaver; + public final fun getBUNDLE_KEY ()Ljava/lang/String; +} + +public abstract interface class com/squareup/workflow1/ui/TreeSnapshotSaver$HasTreeSnapshot { + public abstract fun latestSnapshot ()Lcom/squareup/workflow1/TreeSnapshot; +} + +public final class com/squareup/workflow1/ui/TypedViewRegistry : com/squareup/workflow1/ui/ViewRegistry { + public fun ([Lcom/squareup/workflow1/ui/ViewFactory;)V + public fun getFactoryFor (Lkotlin/reflect/KClass;)Lcom/squareup/workflow1/ui/ViewFactory; + public fun getKeys ()Ljava/util/Set; +} + public final class com/squareup/workflow1/ui/ViewBindingViewFactory : com/squareup/workflow1/ui/ViewFactory { public fun (Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function1;)V public fun buildView (Ljava/lang/Object;Lcom/squareup/workflow1/ui/ViewEnvironment;Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/View; @@ -95,6 +158,11 @@ public final class com/squareup/workflow1/ui/ViewFactory$DefaultImpls { public static synthetic fun buildView$default (Lcom/squareup/workflow1/ui/ViewFactory;Ljava/lang/Object;Lcom/squareup/workflow1/ui/ViewEnvironment;Landroid/content/Context;Landroid/view/ViewGroup;ILjava/lang/Object;)Landroid/view/View; } +public final class com/squareup/workflow1/ui/ViewLaunchWhenAttachedKt { + public static final fun launchWhenAttached (Landroid/view/View;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/Job; + public static synthetic fun launchWhenAttached$default (Landroid/view/View;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/Job; +} + public abstract interface class com/squareup/workflow1/ui/ViewRegistry { public static final field Companion Lcom/squareup/workflow1/ui/ViewRegistry$Companion; public abstract fun getFactoryFor (Lkotlin/reflect/KClass;)Lcom/squareup/workflow1/ui/ViewFactory; @@ -120,7 +188,10 @@ public final class com/squareup/workflow1/ui/ViewShowRenderingKt { public static final fun bindShowRendering (Landroid/view/View;Ljava/lang/Object;Lcom/squareup/workflow1/ui/ViewEnvironment;Lkotlin/jvm/functions/Function2;)V public static final fun canShowRendering (Landroid/view/View;Ljava/lang/Object;)Z public static final fun getEnvironment (Landroid/view/View;)Lcom/squareup/workflow1/ui/ViewEnvironment; + public static final synthetic fun getRendering (Landroid/view/View;)Ljava/lang/Object; public static final fun getShowRendering (Landroid/view/View;)Lkotlin/jvm/functions/Function2; + public static final fun getStarter (Landroid/view/View;)Lkotlin/jvm/functions/Function1; + public static final fun setStarter (Landroid/view/View;Lkotlin/jvm/functions/Function1;)V public static final fun showRendering (Landroid/view/View;Ljava/lang/Object;Lcom/squareup/workflow1/ui/ViewEnvironment;)V public static final fun start (Landroid/view/View;)V } @@ -140,11 +211,13 @@ public final class com/squareup/workflow1/ui/WorkflowLayout : android/widget/Fra public abstract class com/squareup/workflow1/ui/WorkflowViewState { public abstract fun getEnvironment ()Lcom/squareup/workflow1/ui/ViewEnvironment; public abstract fun getShowRendering ()Lkotlin/jvm/functions/Function2; + public abstract fun getShowing ()Ljava/lang/Object; } public final class com/squareup/workflow1/ui/WorkflowViewState$New : com/squareup/workflow1/ui/WorkflowViewState { public fun (Ljava/lang/Object;Lcom/squareup/workflow1/ui/ViewEnvironment;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;)V public synthetic fun (Ljava/lang/Object;Lcom/squareup/workflow1/ui/ViewEnvironment;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1$wf1_core_android ()Ljava/lang/Object; public final fun component2 ()Lcom/squareup/workflow1/ui/ViewEnvironment; public final fun component3 ()Lkotlin/jvm/functions/Function2; public final fun component4 ()Lkotlin/jvm/functions/Function1; @@ -154,6 +227,7 @@ public final class com/squareup/workflow1/ui/WorkflowViewState$New : com/squareu public fun getEnvironment ()Lcom/squareup/workflow1/ui/ViewEnvironment; public fun getShowRendering ()Lkotlin/jvm/functions/Function2; public synthetic fun getShowing ()Ljava/lang/Object; + public fun getShowing$wf1_core_android ()Ljava/lang/Object; public final fun getStarter ()Lkotlin/jvm/functions/Function1; public fun hashCode ()I public fun toString ()Ljava/lang/String; @@ -161,6 +235,7 @@ public final class com/squareup/workflow1/ui/WorkflowViewState$New : com/squareu public final class com/squareup/workflow1/ui/WorkflowViewState$Started : com/squareup/workflow1/ui/WorkflowViewState { public fun (Ljava/lang/Object;Lcom/squareup/workflow1/ui/ViewEnvironment;Lkotlin/jvm/functions/Function2;)V + public final fun component1$wf1_core_android ()Ljava/lang/Object; public final fun component2 ()Lcom/squareup/workflow1/ui/ViewEnvironment; public final fun component3 ()Lkotlin/jvm/functions/Function2; public final fun copy (Ljava/lang/Object;Lcom/squareup/workflow1/ui/ViewEnvironment;Lkotlin/jvm/functions/Function2;)Lcom/squareup/workflow1/ui/WorkflowViewState$Started; @@ -169,10 +244,19 @@ public final class com/squareup/workflow1/ui/WorkflowViewState$Started : com/squ public fun getEnvironment ()Lcom/squareup/workflow1/ui/ViewEnvironment; public fun getShowRendering ()Lkotlin/jvm/functions/Function2; public synthetic fun getShowing ()Ljava/lang/Object; + public fun getShowing$wf1_core_android ()Ljava/lang/Object; public fun hashCode ()I public fun toString ()Ljava/lang/String; } +public final class com/squareup/workflow1/ui/WorkflowViewStateKt { + public static final fun getWorkflowViewState (Landroid/view/View;)Lcom/squareup/workflow1/ui/WorkflowViewState; + public static final fun getWorkflowViewStateAsNew (Landroid/view/View;)Lcom/squareup/workflow1/ui/WorkflowViewState$New; + public static final fun getWorkflowViewStateAsStarted (Landroid/view/View;)Lcom/squareup/workflow1/ui/WorkflowViewState$Started; + public static final fun getWorkflowViewStateOrNull (Landroid/view/View;)Lcom/squareup/workflow1/ui/WorkflowViewState; + public static final fun setWorkflowViewState (Landroid/view/View;Lcom/squareup/workflow1/ui/WorkflowViewState;)V +} + public final class com/squareup/workflow1/ui/WorkflowViewStub : android/view/View { public fun (Landroid/content/Context;)V public fun (Landroid/content/Context;Landroid/util/AttributeSet;)V @@ -193,6 +277,18 @@ public final class com/squareup/workflow1/ui/WorkflowViewStub : android/view/Vie public final fun update (Ljava/lang/Object;Lcom/squareup/workflow1/ui/ViewEnvironment;)Landroid/view/View; } +public final class com/squareup/workflow1/ui/androidx/RealWorkflowLifecycleOwner : android/view/View$OnAttachStateChangeListener, androidx/lifecycle/LifecycleEventObserver, androidx/lifecycle/LifecycleOwner, com/squareup/workflow1/ui/androidx/WorkflowLifecycleOwner { + public fun (Lkotlin/jvm/functions/Function1;Z)V + public synthetic fun (Lkotlin/jvm/functions/Function1;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun destroyOnDetach ()V + public fun getLifecycle ()Landroidx/lifecycle/Lifecycle; + public fun onStateChanged (Landroidx/lifecycle/LifecycleOwner;Landroidx/lifecycle/Lifecycle$Event;)V + public fun onViewAttachedToWindow (Landroid/view/View;)V + public fun onViewDetachedFromWindow (Landroid/view/View;)V + public final fun updateLifecycle$wf1_core_android (Z)V + public static synthetic fun updateLifecycle$wf1_core_android$default (Lcom/squareup/workflow1/ui/androidx/RealWorkflowLifecycleOwner;ZILjava/lang/Object;)V +} + public final class com/squareup/workflow1/ui/androidx/WorkflowAndroidXSupport { public static final field INSTANCE Lcom/squareup/workflow1/ui/androidx/WorkflowAndroidXSupport; public final fun lifecycleOwnerFromViewTreeOrContext (Landroid/view/View;)Landroidx/lifecycle/LifecycleOwner; diff --git a/workflow-ui/internal-testing-android/api/internal-testing-android.api b/workflow-ui/internal-testing-android/api/internal-testing-android.api index d820aa7654..17eab94a94 100644 --- a/workflow-ui/internal-testing-android/api/internal-testing-android.api +++ b/workflow-ui/internal-testing-android/api/internal-testing-android.api @@ -15,12 +15,16 @@ public abstract class com/squareup/workflow1/ui/internal/test/AbstractLifecycleT } public class com/squareup/workflow1/ui/internal/test/AbstractLifecycleTestActivity$LeafView : android/widget/FrameLayout { + public field rendering Ljava/lang/Object; public fun (Landroid/content/Context;)V public final fun getRendering ()Ljava/lang/Object; + public final fun getViewObserver$wf1_internal_testing_android ()Lcom/squareup/workflow1/ui/internal/test/AbstractLifecycleTestActivity$ViewObserver; protected fun onAttachedToWindow ()V protected fun onDetachedFromWindow ()V protected fun onRestoreInstanceState (Landroid/os/Parcelable;)V protected fun onSaveInstanceState ()Landroid/os/Parcelable; + public final fun setRendering$wf1_internal_testing_android (Ljava/lang/Object;)V + public final fun setViewObserver$wf1_internal_testing_android (Lcom/squareup/workflow1/ui/internal/test/AbstractLifecycleTestActivity$ViewObserver;)V } public abstract interface class com/squareup/workflow1/ui/internal/test/AbstractLifecycleTestActivity$ViewObserver {