Skip to content

Commit ec95ab1

Browse files
committed
BREAKING: 🔥 Delete all the deprecated things.
1 parent ce7180e commit ec95ab1

File tree

103 files changed

+198
-7051
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+198
-7051
lines changed

samples/compose-samples/src/main/java/com/squareup/sample/compose/hellocomposebinding/HelloBindingActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import com.squareup.workflow1.ui.ViewEnvironment
1717
import com.squareup.workflow1.ui.ViewRegistry
1818
import com.squareup.workflow1.ui.WorkflowLayout
1919
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
20-
import com.squareup.workflow1.ui.compose.composeViewFactory
2120
import com.squareup.workflow1.ui.compose.withCompositionRoot
2221
import com.squareup.workflow1.ui.plus
2322
import com.squareup.workflow1.ui.renderWorkflowIn
@@ -31,7 +30,8 @@ private val viewEnvironment =
3130
}
3231

3332
/**
34-
* Demonstrates how to create and display a view factory with [composeViewFactory].
33+
* Demonstrates how to create and display a view factory with
34+
* [composeScreenViewFactory][com.squareup.workflow1.ui.compose.composeScreenViewFactory].
3535
*/
3636
class HelloBindingActivity : AppCompatActivity() {
3737
@OptIn(WorkflowUiExperimentalApi::class)

samples/containers/hello-back-button/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ dependencies {
1919
implementation(libs.androidx.activity.ktx)
2020

2121
implementation(project(":samples:containers:android"))
22-
implementation(project(":workflow-ui:container-android"))
2322
implementation(project(":workflow-ui:core-android"))
2423
implementation(project(":workflow-ui:core-common"))
2524
}

samples/dungeon/app/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ dependencies {
4848
implementation(project(":samples:dungeon:timemachine"))
4949
implementation(project(":samples:dungeon:timemachine-shakeable"))
5050
implementation(project(":workflow-tracing"))
51-
implementation(project(":workflow-ui:container-android"))
52-
implementation(project(":workflow-ui:container-common"))
5351
implementation(project(":workflow-ui:core-android"))
5452
implementation(project(":workflow-ui:core-common"))
5553

samples/dungeon/app/src/main/java/com/squareup/sample/dungeon/TimeMachineAppWorkflow.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ import com.squareup.sample.timemachine.shakeable.ShakeableTimeMachineScreen
77
import com.squareup.sample.timemachine.shakeable.ShakeableTimeMachineWorkflow
88
import com.squareup.sample.timemachine.shakeable.ShakeableTimeMachineWorkflow.PropsFactory
99
import com.squareup.workflow1.StatelessWorkflow
10-
import com.squareup.workflow1.mapRendering
1110
import com.squareup.workflow1.renderChild
1211
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
13-
import com.squareup.workflow1.ui.asScreen
1412
import kotlin.time.ExperimentalTime
1513
import kotlin.time.TimeSource
1614

@@ -25,10 +23,9 @@ class TimeMachineAppWorkflow(
2523
context: Context
2624
) : StatelessWorkflow<BoardPath, Nothing, ShakeableTimeMachineScreen>() {
2725

28-
@Suppress("DEPRECATION")
2926
private val timeMachineWorkflow =
3027
ShakeableTimeMachineWorkflow(
31-
TimeMachineWorkflow(appWorkflow.mapRendering { asScreen(it) }, clock),
28+
TimeMachineWorkflow(appWorkflow, clock),
3229
context
3330
)
3431

samples/tictactoe/app/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ dependencies {
4040
implementation(project(":samples:containers:android"))
4141
implementation(project(":samples:tictactoe:common"))
4242
implementation(project(":workflow-tracing"))
43-
implementation(project(":workflow-ui:container-android"))
4443
implementation(project(":workflow-ui:core-android"))
4544
implementation(project(":workflow-ui:core-common"))
4645
}

settings.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ include(
7373
":workflow-ui:core-android",
7474
":workflow-ui:internal-testing-android",
7575
":workflow-ui:internal-testing-compose",
76-
":workflow-ui:container-common",
77-
":workflow-ui:container-android",
7876
":workflow-ui:radiography"
7977
)
8078

workflow-testing/src/test/java/com/squareup/workflow1/WorkerCompositionIntegrationTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ internal class WorkerCompositionIntegrationTest {
192192
state += 1
193193
}
194194

195-
val workflow = Workflow.stateful<Int, Int, () -> Unit>(
195+
val workflow = Workflow.stateful(
196196
initialState = 0,
197197
render = { _ ->
198198
runningWorker(triggerOutput) { action { setOutput(state) } }
@@ -221,7 +221,7 @@ internal class WorkerCompositionIntegrationTest {
221221

222222
@Test fun `runningWorker throws when output emitted`() {
223223
@Suppress("UNCHECKED_CAST")
224-
val worker = Worker.from { Unit } as Worker<Nothing>
224+
val worker = Worker.from { } as Worker<Nothing>
225225
val workflow = Workflow.stateless<Unit, Unit, Unit> {
226226
// Suppress runningWorker usage because we want to make sure the deprecated
227227
// method still throws an exception as expected

workflow-testing/src/test/java/com/squareup/workflow1/testing/RealRenderTesterTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ internal class RealRenderTesterTest {
984984

985985
@Test fun `verifyAction verifies workflow output`() {
986986
val child = Workflow.stateless<Unit, String, Unit> {}
987-
val workflow = Workflow.stateless<Unit, Nothing, Unit> {
987+
val workflow = Workflow.stateless {
988988
renderChild(child) { TestAction(it) }
989989
}
990990
val testResult = workflow.testRender(Unit)
@@ -1003,7 +1003,7 @@ internal class RealRenderTesterTest {
10031003

10041004
@Test fun `verifyAction verifies worker output`() {
10051005
val worker = Worker.finished<String>()
1006-
val workflow = Workflow.stateless<Unit, Nothing, Unit> {
1006+
val workflow = Workflow.stateless {
10071007
runningWorker(worker) { TestAction(it) }
10081008
}
10091009
val testResult = workflow.testRender(Unit)

workflow-ui/compose-tooling/api/compose-tooling.api

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
1-
public final class com/squareup/workflow1/ui/compose/tooling/ComposableSingletons$LegacyViewFactoriesKt {
2-
public static final field INSTANCE Lcom/squareup/workflow1/ui/compose/tooling/ComposableSingletons$LegacyViewFactoriesKt;
3-
public static field lambda-1 Lkotlin/jvm/functions/Function4;
4-
public fun <init> ()V
5-
public final fun getLambda-1$wf1_compose_tooling ()Lkotlin/jvm/functions/Function4;
6-
}
7-
81
public final class com/squareup/workflow1/ui/compose/tooling/ComposableSingletons$ViewFactoriesKt {
92
public static final field INSTANCE Lcom/squareup/workflow1/ui/compose/tooling/ComposableSingletons$ViewFactoriesKt;
103
public static field lambda-1 Lkotlin/jvm/functions/Function4;
114
public fun <init> ()V
125
public final fun getLambda-1$wf1_compose_tooling ()Lkotlin/jvm/functions/Function4;
136
}
147

15-
public final class com/squareup/workflow1/ui/compose/tooling/LegacyViewFactoriesKt {
16-
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
17-
}
18-
198
public final class com/squareup/workflow1/ui/compose/tooling/ViewFactoriesKt {
209
public static final fun Preview (Lcom/squareup/workflow1/ui/ScreenViewFactory;Lcom/squareup/workflow1/ui/Screen;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;II)V
2110
}

workflow-ui/compose-tooling/src/androidTest/java/com/squareup/workflow1/ui/compose/tooling/LegacyPreviewViewFactoryTest.kt

Lines changed: 0 additions & 181 deletions
This file was deleted.

workflow-ui/compose-tooling/src/main/java/com/squareup/workflow1/ui/compose/tooling/LegacyViewFactories.kt

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)