ods-android icon indicating copy to clipboard operation
ods-android copied to clipboard

[Bug]: ODS dependency to Material vs Material 3 inconsistency

Open LaurentRenard opened this issue 1 year ago • 0 comments

Prerequisites

Your test device

Any

OS Version

Any

App version

0.18

Describe the issue

Since Compose 2024.02.00, material3 ships with a new lint warning UsingMaterialAndMaterial3Libraries. This warning is triggered during our app build on every import from material, due to ODS dependencies, and prevent the build to succeed :

import androidx.compose.material.Text
Error: Using a material import while also using the material3 library [UsingMaterialAndMaterial3Libraries from androidx.compose.material3]

The description of the lint warning is self explanatory:

Explanation for issues of type "UsingMaterialAndMaterial3Libraries": material and material3 are separate design system libraries that are incompatible with each other, as they have their own distinct theming systems. Using components from both libraries concurrently can cause issues: for example material components will not pick up the correct content color from a material3 container, and vice versa.

While we might de-activate this lint check, this one is definitely too severe to ignore.

Expected Behavior

ODS shall depend on / be built upon either Material design system or Material3, but cannot depend on both as they present different contracts to the app

LaurentRenard avatar Feb 21 '24 10:02 LaurentRenard