[Bug]: ODS dependency to Material vs Material 3 inconsistency
Prerequisites
- [X] I have searched the backlog for duplicate or closed feature requests
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