JsonToggleRolloutStep

data class JsonToggleRolloutStep(val percent: Double)

Shared JSON model classes and a pre-built Moshi instance used exclusively by com.duckduckgo.anvil.annotations.ContributesRemoteFeature-generated _RemoteFeature classes.

These types are public because they must be visible to generated code that lands in arbitrary feature modules. They are an internal implementation detail of the remote feature framework and should never be used directly by feature code.

They live here (feature-toggles-internal-api) rather than in feature-toggles-api because feature-toggles-api already exposes this module via api project(":feature-toggles-internal-api"), so every feature module that depends on feature-toggles-api also gets these on its compile classpath — no new dependency edges are needed. Keeping them out of feature-toggles-api avoids polluting the public API surface with JSON parsing implementation details.

Previously, each of the ~143 usages of @ContributesRemoteFeature generated private copies of these 8 types (≈90 DEX methods per feature ≈ 12,870 methods in total). Sharing a single copy here saves ~12,780 DEX methods across the app.

Constructors

Link copied to clipboard
constructor(percent: Double)

Properties

Link copied to clipboard