ContributesExperimentVariantSerializer

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ContributesExperimentVariantSerializer(val experimentKey: String)(source)

Annotate a Experiment variant class with this to automatically contribute it to the ExperimentScope multibinding. Equivalent to the following declaration in an application module:

@Module
@ContributesTo(ExperimentScope::class)
abstract class ExperimentVariantSerializerModule {
@Binds @IntoMap
@ExperimentVariantMapKey("main")
abstract fun bindSerializer(serializer: MainExperimentVariantSerializer): ExperimentVariantSerializer
}

The generated code created via the anvil-codegen module.

Properties

Link copied to clipboard