Skip to content
This repository was archived by the owner on Feb 5, 2021. It is now read-only.

Tidy up the package structure. #23

Merged
merged 1 commit into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compose-tooling/api/compose-tooling.api
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ public final class com/squareup/workflow/ui/compose/tooling/BuildConfig {
}

public final class com/squareup/workflow/ui/compose/tooling/ComposeWorkflowsKt {
public static final fun preview (Lcom/squareup/workflow/compose/ComposeWorkflow;Ljava/lang/Object;Landroidx/ui/core/Modifier;Landroidx/ui/core/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/Composer;)V
public static synthetic fun preview$default (Lcom/squareup/workflow/compose/ComposeWorkflow;Ljava/lang/Object;Landroidx/ui/core/Modifier;Landroidx/ui/core/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/Composer;ILjava/lang/Object;)V
public static final fun preview (Lcom/squareup/workflow/ui/compose/ComposeWorkflow;Ljava/lang/Object;Landroidx/ui/core/Modifier;Landroidx/ui/core/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/Composer;)V
public static synthetic fun preview$default (Lcom/squareup/workflow/ui/compose/ComposeWorkflow;Ljava/lang/Object;Landroidx/ui/core/Modifier;Landroidx/ui/core/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/Composer;ILjava/lang/Object;)V
}

public final class com/squareup/workflow/ui/compose/tooling/ViewFactoriesKt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import androidx.ui.test.findByText
import androidx.ui.tooling.preview.Preview
import androidx.ui.unit.dp
import com.squareup.workflow.Workflow
import com.squareup.workflow.compose.composed
import com.squareup.workflow.ui.compose.composed
import com.squareup.workflow.ui.ViewEnvironmentKey
import com.squareup.workflow.ui.compose.showRendering
import org.junit.Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import androidx.compose.Composable
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
import com.squareup.workflow.Sink
import com.squareup.workflow.compose.ComposeWorkflow
import com.squareup.workflow.ui.compose.ComposeWorkflow
import com.squareup.workflow.ui.ViewEnvironment
import com.squareup.workflow.ui.ViewFactory
import com.squareup.workflow.ui.ViewRegistry
Expand Down
36 changes: 18 additions & 18 deletions core-compose/api/core-compose.api
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
public final class com/squareup/workflow/compose/ComposeRendering {
public static final field Companion Lcom/squareup/workflow/compose/ComposeRendering$Companion;
public final class com/squareup/workflow/ui/compose/ComposeRendering {
public static final field Companion Lcom/squareup/workflow/ui/compose/ComposeRendering$Companion;
public static final fun <clinit> ()V
public fun <init> (Lkotlin/jvm/functions/Function2;)V
}

public final class com/squareup/workflow/compose/ComposeRendering$Companion {
public final class com/squareup/workflow/ui/compose/ComposeRendering$Companion {
public final fun getFactory ()Lcom/squareup/workflow/ui/ViewFactory;
public final fun getNoopRendering ()Lcom/squareup/workflow/compose/ComposeRendering;
}

public abstract class com/squareup/workflow/compose/ComposeWorkflow : com/squareup/workflow/Workflow {
public fun <init> ()V
public fun asStatefulWorkflow ()Lcom/squareup/workflow/StatefulWorkflow;
public abstract fun render (Ljava/lang/Object;Lcom/squareup/workflow/Sink;Lcom/squareup/workflow/ui/ViewEnvironment;Landroidx/compose/Composer;)V
}

public final class com/squareup/workflow/compose/ComposeWorkflowKt {
public static final fun composed (Lcom/squareup/workflow/Workflow$Companion;Lkotlin/jvm/functions/Function4;)Lcom/squareup/workflow/compose/ComposeWorkflow;
}

public final class com/squareup/workflow/ui/compose/ComposeSupportKt {
public static final fun <clinit> ()V
public final fun getNoopRendering ()Lcom/squareup/workflow/ui/compose/ComposeRendering;
}

public final class com/squareup/workflow/ui/compose/ComposeViewFactory : com/squareup/workflow/ui/ViewFactory {
Expand All @@ -46,6 +32,16 @@ public final class com/squareup/workflow/ui/compose/ComposeViewFactoryRootKt {
public static final fun withComposeViewFactoryRoot (Lcom/squareup/workflow/ui/ViewEnvironment;Lkotlin/jvm/functions/Function2;)Lcom/squareup/workflow/ui/ViewEnvironment;
}

public abstract class com/squareup/workflow/ui/compose/ComposeWorkflow : com/squareup/workflow/Workflow {
public fun <init> ()V
public fun asStatefulWorkflow ()Lcom/squareup/workflow/StatefulWorkflow;
public abstract fun render (Ljava/lang/Object;Lcom/squareup/workflow/Sink;Lcom/squareup/workflow/ui/ViewEnvironment;Landroidx/compose/Composer;)V
}

public final class com/squareup/workflow/ui/compose/ComposeWorkflowKt {
public static final fun composed (Lcom/squareup/workflow/Workflow$Companion;Lkotlin/jvm/functions/Function4;)Lcom/squareup/workflow/ui/compose/ComposeWorkflow;
}

public final class com/squareup/workflow/ui/compose/ViewEnvironmentsKt {
public static final fun showRendering (Lcom/squareup/workflow/ui/ViewEnvironment;Ljava/lang/Object;Landroidx/ui/core/Modifier;Landroidx/compose/Composer;)V
public static synthetic fun showRendering$default (Lcom/squareup/workflow/ui/ViewEnvironment;Ljava/lang/Object;Landroidx/ui/core/Modifier;Landroidx/compose/Composer;ILjava/lang/Object;)V
Expand All @@ -70,6 +66,10 @@ public final class com/squareup/workflow/ui/compose/WorkflowContainerKt {
public static synthetic fun WorkflowContainer$default (Lcom/squareup/workflow/Workflow;Lkotlin/jvm/functions/Function1;Landroidx/ui/core/Modifier;Lcom/squareup/workflow/diagnostic/WorkflowDiagnosticListener;Lkotlin/jvm/functions/Function2;Landroidx/compose/Composer;ILjava/lang/Object;)V
}

public final class com/squareup/workflow/ui/compose/internal/ComposeSupportKt {
public static final fun <clinit> ()V
}

public final class com/squareup/workflow/ui/core/compose/BuildConfig {
public static final field BUILD_TYPE Ljava/lang/String;
public static final field DEBUG Z
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import androidx.ui.test.assertIsDisplayed
import androidx.ui.test.createComposeRule
import androidx.ui.test.findByText
import com.google.common.truth.Truth.assertThat
import com.squareup.workflow.ui.compose.internal.SafeComposeViewFactoryRoot
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@
*/
@file:Suppress("RemoveEmptyParenthesesFromAnnotationEntry")

package com.squareup.workflow.compose
package com.squareup.workflow.ui.compose

import androidx.compose.Composable
import com.squareup.workflow.compose.ComposeRendering.Companion.Factory
import com.squareup.workflow.compose.ComposeRendering.Companion.NoopRendering
import com.squareup.workflow.ui.compose.ComposeRendering.Companion.Factory
import com.squareup.workflow.ui.compose.ComposeRendering.Companion.NoopRendering
import com.squareup.workflow.ui.ViewEnvironment
import com.squareup.workflow.ui.ViewFactory
import com.squareup.workflow.ui.compose.bindCompose

/**
* A workflow rendering that renders itself using a [Composable] function.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ import androidx.ui.core.setContent
import com.squareup.workflow.ui.ViewEnvironment
import com.squareup.workflow.ui.ViewFactory
import com.squareup.workflow.ui.bindShowRendering
import com.squareup.workflow.ui.compose.internal.CompositionContinuation
import com.squareup.workflow.ui.compose.internal.SafeComposeViewFactoryRoot
import com.squareup.workflow.ui.compose.internal.setContent
import kotlin.reflect.KClass

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
*/
@file:Suppress("RemoveEmptyParenthesesFromAnnotationEntry")

package com.squareup.workflow.compose
package com.squareup.workflow.ui.compose

import androidx.compose.Composable
import com.squareup.workflow.Sink
import com.squareup.workflow.StatefulWorkflow
import com.squareup.workflow.Workflow
import com.squareup.workflow.ui.ViewEnvironment
import com.squareup.workflow.ui.compose.internal.ComposeWorkflowImpl

/**
* A stateless [Workflow][com.squareup.workflow.Workflow] that [renders][render] itself as
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import androidx.compose.remember
import androidx.ui.core.Modifier
import com.squareup.workflow.ui.ViewEnvironment
import com.squareup.workflow.ui.ViewRegistry
import com.squareup.workflow.ui.compose.internal.showRendering

/**
* Renders [rendering] into the composition using this [ViewEnvironment]'s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import androidx.ui.savedinstancestate.UiSavedStateRegistryAmbient
import androidx.ui.savedinstancestate.savedInstanceState
import com.squareup.workflow.Snapshot
import com.squareup.workflow.Workflow
import com.squareup.workflow.compose.ComposeRendering
import com.squareup.workflow.diagnostic.WorkflowDiagnosticListener
import com.squareup.workflow.launchWorkflowIn
import com.squareup.workflow.ui.ViewEnvironment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
@file:Suppress("RemoveEmptyParenthesesFromAnnotationEntry")

package com.squareup.workflow.ui.compose
package com.squareup.workflow.ui.compose.internal

import android.content.Context
import android.view.View
Expand All @@ -27,11 +27,11 @@ import androidx.compose.Recomposer
import androidx.compose.compositionFor
import androidx.lifecycle.LifecycleOwner
import androidx.ui.node.UiComposer
import com.squareup.workflow.ui.compose.ReflectionSupport.ANDROID_OWNER_CLASS
import com.squareup.workflow.ui.compose.ReflectionSupport.androidOwnerView
import com.squareup.workflow.ui.compose.ReflectionSupport.createOwner
import com.squareup.workflow.ui.compose.ReflectionSupport.createWrappedContent
import com.squareup.workflow.ui.compose.ReflectionSupport.ownerRoot
import com.squareup.workflow.ui.compose.internal.ReflectionSupport.ANDROID_OWNER_CLASS
import com.squareup.workflow.ui.compose.internal.ReflectionSupport.androidOwnerView
import com.squareup.workflow.ui.compose.internal.ReflectionSupport.createOwner
import com.squareup.workflow.ui.compose.internal.ReflectionSupport.createWrappedContent
import com.squareup.workflow.ui.compose.internal.ReflectionSupport.ownerRoot
import com.squareup.workflow.ui.core.compose.R

private typealias AndroidOwner = Any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.squareup.workflow.compose
package com.squareup.workflow.ui.compose.internal

import androidx.compose.MutableState
import androidx.compose.StructurallyEqual
Expand All @@ -23,8 +23,10 @@ import com.squareup.workflow.Sink
import com.squareup.workflow.Snapshot
import com.squareup.workflow.StatefulWorkflow
import com.squareup.workflow.action
import com.squareup.workflow.compose.ComposeWorkflowImpl.State
import com.squareup.workflow.ui.compose.internal.ComposeWorkflowImpl.State
import com.squareup.workflow.contraMap
import com.squareup.workflow.ui.compose.ComposeRendering
import com.squareup.workflow.ui.compose.ComposeWorkflow

internal class ComposeWorkflowImpl<PropsT, OutputT : Any>(
private val workflow: ComposeWorkflow<PropsT, OutputT>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.squareup.workflow.ui.compose
package com.squareup.workflow.ui.compose.internal

import androidx.compose.Composable
import androidx.compose.CompositionReference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
*/
@file:Suppress("RemoveEmptyParenthesesFromAnnotationEntry")

package com.squareup.workflow.ui.compose
package com.squareup.workflow.ui.compose.internal

import androidx.compose.Composable
import com.squareup.workflow.ui.compose.ComposeViewFactoryRoot

/**
* [ComposeViewFactoryRoot] that asserts that the [wrap] method invokes its children parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.squareup.workflow.ui.compose
package com.squareup.workflow.ui.compose.internal

import android.content.Context
import android.view.ViewGroup.LayoutParams.MATCH_PARENT
Expand All @@ -24,7 +24,8 @@ import androidx.ui.foundation.Box
import com.squareup.workflow.ui.ViewEnvironment
import com.squareup.workflow.ui.ViewFactory
import com.squareup.workflow.ui.WorkflowViewStub
import com.squareup.workflow.ui.compose.ComposableViewStubWrapper.Update
import com.squareup.workflow.ui.compose.ComposeViewFactory
import com.squareup.workflow.ui.compose.internal.ComposableViewStubWrapper.Update

/**
* Renders [rendering] into the composition using the `ViewRegistry` from the [ViewEnvironment] to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.squareup.workflow.ui.compose
package com.squareup.workflow.ui.compose.internal

import androidx.compose.Composable
import androidx.compose.remember
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package com.squareup.sample.hellocomposerendering

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.squareup.workflow.compose.ComposeRendering
import com.squareup.workflow.ui.compose.ComposeRendering
import com.squareup.workflow.diagnostic.SimpleLoggingDiagnosticListener
import com.squareup.workflow.ui.ViewRegistry
import com.squareup.workflow.ui.WorkflowRunner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import androidx.ui.material.ripple.ripple
import androidx.ui.tooling.preview.Preview
import com.squareup.sample.hellocomposerendering.HelloRenderingWorkflow.Toggle
import com.squareup.workflow.Sink
import com.squareup.workflow.compose.ComposeWorkflow
import com.squareup.workflow.ui.compose.ComposeWorkflow
import com.squareup.workflow.ui.ViewEnvironment
import com.squareup.workflow.ui.compose.tooling.preview

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import com.squareup.workflow.RenderContext
import com.squareup.workflow.Snapshot
import com.squareup.workflow.StatefulWorkflow
import com.squareup.workflow.action
import com.squareup.workflow.compose.ComposeRendering
import com.squareup.workflow.ui.compose.ComposeRendering
import com.squareup.workflow.parse

object HelloWorkflow : StatefulWorkflow<Unit, State, Nothing, ComposeRendering>() {
Expand Down

This file was deleted.