This guide helps you migrate between major versions of OUDS Android.
Breaking changes in this version:
- Minimum Android SDK version updated to API 24
- OudsChipState: New Skeleton enum value
- Public classes no longer use
datamodifier - Space token properties marked as restricted API
OudsVersionmarked as internal API
Impact: Applications targeting Android 6.0 (API 23) will no longer be able to use OUDS Android 3.0.0 and above.
Before (v2.x):
android {
defaultConfig {
minSdk = 23
}
}After (v3.0):
android {
defaultConfig {
minSdk = 24
}
}Recommendation: Use a version catalog (
gradle/libs.versions.toml) to centralize SDK version management across your project modules.
- Update your app's
minSdkto at least 24 in your build configuration - Ensure your app no longer needs to support Android 6.0 (Marshmallow)
- Verify compatibility with your target user base
A new Skeleton value has been added to the OudsChipState enum.
Impact: Applications with exhaustive when expressions on OudsChipState will fail to compile and may crash at runtime if upgraded without recompiling.
Before (v2.x):
OudsBasicSuggestionChip(...) {
when (state) {
OudsChipState.Enabled -> Icon1()
OudsChipState.Hovered -> Icon2()
OudsChipState.Pressed -> Icon3()
OudsChipState.Disabled -> Icon4()
OudsChipState.Focused -> Icon5()
}
}After (v3.0):
OudsBasicSuggestionChip(...) {
when (state) {
OudsChipState.Enabled -> Icon1()
OudsChipState.Hovered -> Icon2()
OudsChipState.Pressed -> Icon3()
OudsChipState.Disabled -> Icon4()
OudsChipState.Focused -> Icon5()
OudsChipState.Skeleton -> Icon6() // Add this branch
}
}- Search your codebase for exhaustive
whenexpressions onOudsChipState - Add the
OudsChipState.Skeletonbranch or add anelsebranch - Recompile your application after upgrading
To maintain binary compatibility in future releases, the data modifier has been removed from public API classes. This change allows OUDS Android to safely add new properties to these classes in minor or patch releases without breaking binary compatibility for existing compiled applications. When data classes add new properties, new componentN() methods are generated, which breaks binary compatibility. By removing the data modifier in this major release, future updates can extend these classes without causing breaking changes.
Impact: Auto-generated methods (copy(), componentN(), toString(), equals(), hashCode()) are no longer available on these classes.
Methods no longer available:
- ❌
copy()- Cannot create modified copies with named parameters - ❌
componentN()- Destructuring declarations no longer supported - ❌
equals()/hashCode()- Auto-generated implementations no longer available - ❌
toString()- Formatted string representation no longer available
Affected classes:
Component configuration classes:
OudsAlertMessageActionLinkOudsBulletListTextStyleOudsButtonLoaderOudsNavigationBarItemOudsNavigationBarItemBadgeOudsTagLoaderOudsTextInputHelperLinkOudsTextInputLoaderOudsTopAppBarActionBadge
Theme token containers (and all nested classes):
OudsBordersOudsColorSchemeOudsComponentsOudsEffectsOudsElevationsOudsGridsOudsOpacitiesOudsSizesOudsSpacesOudsTypography
Before (v2.x):
// Creating and modifying with copy()
val item = OudsNavigationBarItem(
selected = false,
onClick = { },
icon = icon,
label = "Home"
)
val updatedItem = item.copy(selected = true) // No longer works
// Destructuring
val (light, dark) = colorToken // No longer worksAfter (v3.0):
// Must create new instances instead of using copy()
val item = OudsNavigationBarItem(
selected = false,
onClick = { },
icon = icon,
label = "Home"
)
val updatedItem = OudsNavigationBarItem(
selected = true, // Updated value
onClick = item.onClick,
icon = item.icon,
label = item.label
)
// Access properties directly instead of destructuring
val light = colorToken.light
val dark = colorToken.dark- Search your codebase for
.copy()calls on OUDS classes - Replace with new constructor calls passing all required parameters
- Remove destructuring declarations (e.g.,
val (a, b) = instance) and use direct property access instead - Recompile your application after upgrading
Space token properties (except fixed and scaled) are now marked with @RestrictedOudsApi. Only OudsTheme.spaces.fixed and OudsTheme.spaces.scaled should be used for spacing in applications. Other space tokens are restricted to specific internal use cases.
Impact: Applications accessing restricted space token properties will fail to compile unless they opt-in.
Affected properties:
- All properties in
OudsSpaces.PaddingInline - All properties in
OudsSpaces.PaddingBlock - All properties in
OudsSpaces.Inset - All properties in
OudsSpaces.ColumnGap - All properties in
OudsSpaces.RowGap
Note:
OudsTheme.spaces.fixedandOudsTheme.spaces.scaledremain unrestricted and should be used instead.
- Search your codebase for usage of
OudsTheme.spaces.paddingInline,OudsTheme.spaces.paddingBlock,OudsTheme.spaces.inset,OudsTheme.spaces.columnGap, orOudsTheme.spaces.rowGap - Replace with
OudsTheme.spaces.fixedorOudsTheme.spaces.scaledwhich provide the standard spacing values - If direct access to restricted tokens is necessary —most commonly when creating custom components—, opt-in by adding
@OptIn(RestrictedOudsApi::class)at the call site or file level - Recompile your application after upgrading
OudsVersion contains automatically generated version information that can change without notice. This API is not intended for application use and has been marked with @InternalOudsApi to indicate it should not be relied upon.
Impact: Applications accessing OudsVersion will fail to compile unless they opt-in.
Affected API:
OudsVersion
- Search your codebase for usage of
OudsVersion - Remove dependency on
OudsVersionas it contains automatically generated information that can change without notice - Do not use this API - it is not intended for application use
- Recompile your application after upgrading
Breaking changes in this version:
- Space inset token reorganization
- Link component: paddingBlock structure change
- Progress indicator: default status changed to Neutral
The space inset token scale has been reorganized to align with the latest Orange Unified Design System specifications. A new larger small token has been introduced, and all smaller tokens have shifted down by one size level.
Impact: Applications using OudsTheme.spaces.inset.* properties will experience visual spacing changes unless code is updated.
| Old property (v1.x) | New property (v2.0) | Action required |
|---|---|---|
small |
extraSmall |
Replace small with extraSmall |
extraSmall |
twoExtraSmall |
Replace extraSmall with twoExtraSmall |
twoExtraSmall |
threeExtraSmall |
Replace twoExtraSmall with threeExtraSmall |
threeExtraSmall |
fourExtraSmall |
Replace threeExtraSmall with fourExtraSmall |
fourExtraSmall |
fiveExtraSmall |
Replace fourExtraSmall with fiveExtraSmall |
| N/A | small |
New larger size available |
Note: Actual spacing values depend on your theme (Orange, Sosh, etc.). The table above shows the property name mappings to maintain equivalent semantic sizes across the update.
Before (v1.x):
Modifier.padding(OudsTheme.spaces.inset.small)After (v2.0):
// To maintain the same semantic size:
Modifier.padding(OudsTheme.spaces.inset.extraSmall)
// Or use the new larger small size:
Modifier.padding(OudsTheme.spaces.inset.small)- Search your codebase for usage of
OudsTheme.spaces.inset.*properties - Review each usage to determine the intended spacing value
- Update property names according to the table above to maintain current spacing values
- Test visually to ensure layouts appear as expected
- Consider using the new
smallwhere a slightly larger spacing would improve your design
The OudsComponents.Link.Space.paddingBlock property has changed from a single Dp value to a structured object.
Before (v1.x):
val padding = OudsTheme.components.link.space.paddingBlock // DpAfter (v2.0):
// paddingBlock is now a data class with multiple properties:
val padding = OudsTheme.components.link.space.paddingBlock.default // Dp
// Available properties: default, small, compactDensityDefault, compactDensitySmall- Find usages of
OudsTheme.components.link.space.paddingBlock - Choose the appropriate property based on your use case
- Update references to access the specific property
The default status parameter for OudsCircularProgressIndicator and OudsLinearProgressIndicator has been changed from Accent to Neutral.
Impact: Progress indicators without an explicit status parameter will now display using neutral colors instead of accent colors.
Before (v1.x):
OudsLinearProgressIndicator() // Uses Accent statusAfter (v2.0):
// Now uses Neutral status by default
OudsLinearProgressIndicator()
// To maintain v1.x appearance:
OudsLinearProgressIndicator(status = OudsProgressIndicatorStatus.Accent)- Review all progress indicator usages in your codebase
- For brand-related operations, explicitly set
status = OudsProgressIndicatorStatus.Accent - Test visually to ensure progress indicators match your intended design
- Minimum Android SDK updated to API 24
- OudsChipState Skeleton enum value addition
- Public classes no longer use data modifier
- Space token properties marked as restricted API
- OudsVersion marked as internal API
- Space inset token reorganization
- Link component paddingBlock structure change
- Progress indicator default status changed to Neutral
- Previous stable releases