Start migrating Anvil KSP to Metro
This commit is contained in:
parent
d4d57b1e21
commit
b76a71ebf5
703 changed files with 3523 additions and 2820 deletions
|
|
@ -10,14 +10,15 @@ package io.element.android.libraries.troubleshoot.impl
|
|||
import com.bumble.appyx.core.modality.BuildContext
|
||||
import com.bumble.appyx.core.node.Node
|
||||
import com.bumble.appyx.core.plugin.Plugin
|
||||
import com.squareup.anvil.annotations.ContributesBinding
|
||||
import dev.zacsweers.metro.ContributesBinding
|
||||
import io.element.android.libraries.architecture.createNode
|
||||
import io.element.android.libraries.di.AppScope
|
||||
import dev.zacsweers.metro.AppScope
|
||||
import io.element.android.libraries.troubleshoot.api.NotificationTroubleShootEntryPoint
|
||||
import javax.inject.Inject
|
||||
import dev.zacsweers.metro.Inject
|
||||
|
||||
@ContributesBinding(AppScope::class)
|
||||
class DefaultNotificationTroubleShootEntryPoint @Inject constructor() : NotificationTroubleShootEntryPoint {
|
||||
@Inject
|
||||
class DefaultNotificationTroubleShootEntryPoint() : NotificationTroubleShootEntryPoint {
|
||||
override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): NotificationTroubleShootEntryPoint.NodeBuilder {
|
||||
val plugins = ArrayList<Plugin>()
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import com.bumble.appyx.core.modality.BuildContext
|
|||
import com.bumble.appyx.core.node.Node
|
||||
import com.bumble.appyx.core.plugin.Plugin
|
||||
import com.bumble.appyx.core.plugin.plugins
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dev.zacsweers.metro.Assisted
|
||||
import dev.zacsweers.metro.Inject
|
||||
import im.vector.app.features.analytics.plan.MobileScreen
|
||||
import io.element.android.anvilannotations.ContributesNode
|
||||
import io.element.android.libraries.di.SessionScope
|
||||
|
|
@ -22,7 +22,8 @@ import io.element.android.libraries.troubleshoot.api.NotificationTroubleShootEnt
|
|||
import io.element.android.services.analytics.api.ScreenTracker
|
||||
|
||||
@ContributesNode(SessionScope::class)
|
||||
class TroubleshootNotificationsNode @AssistedInject constructor(
|
||||
@Inject
|
||||
class TroubleshootNotificationsNode(
|
||||
@Assisted buildContext: BuildContext,
|
||||
@Assisted plugins: List<Plugin>,
|
||||
private val presenter: TroubleshootNotificationsPresenter,
|
||||
|
|
|
|||
|
|
@ -14,9 +14,10 @@ import androidx.compose.runtime.getValue
|
|||
import androidx.compose.runtime.rememberCoroutineScope
|
||||
import io.element.android.libraries.architecture.Presenter
|
||||
import kotlinx.coroutines.launch
|
||||
import javax.inject.Inject
|
||||
import dev.zacsweers.metro.Inject
|
||||
|
||||
class TroubleshootNotificationsPresenter @Inject constructor(
|
||||
@Inject
|
||||
class TroubleshootNotificationsPresenter(
|
||||
private val troubleshootTestSuite: TroubleshootTestSuite,
|
||||
) : Presenter<TroubleshootNotificationsState> {
|
||||
@Composable
|
||||
|
|
|
|||
|
|
@ -20,9 +20,10 @@ import kotlinx.coroutines.flow.MutableStateFlow
|
|||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
import javax.inject.Inject
|
||||
import dev.zacsweers.metro.Inject
|
||||
|
||||
class TroubleshootTestSuite @Inject constructor(
|
||||
@Inject
|
||||
class TroubleshootTestSuite(
|
||||
private val notificationTroubleshootTests: Set<@JvmSuppressWildcards NotificationTroubleshootTest>,
|
||||
private val getCurrentPushProvider: GetCurrentPushProvider,
|
||||
private val analyticsService: AnalyticsService,
|
||||
|
|
|
|||
|
|
@ -10,14 +10,15 @@ package io.element.android.libraries.troubleshoot.impl.history
|
|||
import com.bumble.appyx.core.modality.BuildContext
|
||||
import com.bumble.appyx.core.node.Node
|
||||
import com.bumble.appyx.core.plugin.Plugin
|
||||
import com.squareup.anvil.annotations.ContributesBinding
|
||||
import dev.zacsweers.metro.ContributesBinding
|
||||
import io.element.android.libraries.architecture.createNode
|
||||
import io.element.android.libraries.di.AppScope
|
||||
import dev.zacsweers.metro.AppScope
|
||||
import io.element.android.libraries.troubleshoot.api.PushHistoryEntryPoint
|
||||
import javax.inject.Inject
|
||||
import dev.zacsweers.metro.Inject
|
||||
|
||||
@ContributesBinding(AppScope::class)
|
||||
class DefaultPushHistoryEntryPoint @Inject constructor() : PushHistoryEntryPoint {
|
||||
@Inject
|
||||
class DefaultPushHistoryEntryPoint() : PushHistoryEntryPoint {
|
||||
override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): PushHistoryEntryPoint.NodeBuilder {
|
||||
val plugins = ArrayList<Plugin>()
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import com.bumble.appyx.core.modality.BuildContext
|
|||
import com.bumble.appyx.core.node.Node
|
||||
import com.bumble.appyx.core.plugin.Plugin
|
||||
import com.bumble.appyx.core.plugin.plugins
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dev.zacsweers.metro.Assisted
|
||||
import dev.zacsweers.metro.Inject
|
||||
import im.vector.app.features.analytics.plan.MobileScreen
|
||||
import io.element.android.anvilannotations.ContributesNode
|
||||
import io.element.android.libraries.di.SessionScope
|
||||
|
|
@ -25,7 +25,8 @@ import io.element.android.libraries.troubleshoot.api.PushHistoryEntryPoint
|
|||
import io.element.android.services.analytics.api.ScreenTracker
|
||||
|
||||
@ContributesNode(SessionScope::class)
|
||||
class PushHistoryNode @AssistedInject constructor(
|
||||
@Inject
|
||||
class PushHistoryNode(
|
||||
@Assisted buildContext: BuildContext,
|
||||
@Assisted plugins: List<Plugin>,
|
||||
private val presenter: PushHistoryPresenter,
|
||||
|
|
|
|||
|
|
@ -20,9 +20,10 @@ import io.element.android.libraries.push.api.PushService
|
|||
import kotlinx.collections.immutable.toImmutableList
|
||||
import kotlinx.coroutines.flow.map
|
||||
import kotlinx.coroutines.launch
|
||||
import javax.inject.Inject
|
||||
import dev.zacsweers.metro.Inject
|
||||
|
||||
class PushHistoryPresenter @Inject constructor(
|
||||
@Inject
|
||||
class PushHistoryPresenter(
|
||||
private val pushService: PushService,
|
||||
) : Presenter<PushHistoryState> {
|
||||
@Composable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue