how can i remove material from my jvm app?
# compose-desktop
a
how can i remove material from my jvm app?
1
Looking at this it seems like we cannot. Is there some gradle magic i can do to remove it or somehow make the IDE never suggest anything material in the meantime?
m
I recently stumbled over this pitfall too when I tried to update my desktop app from material to material 3. I ended up with a mess and finally gave up for now. How do other people handle this?
j
Hmm. What issues are you running into? I use M3 in my desktop JVM app. I make sure to use the M3 imports everywhere.
m
The main problem is that you can access both variants simultaneously. So it’s easy to forget some conversions and you get wrong suggestions for code completion.
✔️ 1
j
Check. Android Lint warns about that. On desktop we might configure Detekt, I think it supports forbidden imports
m
Yes, Detekt or something similar might be a workaround but at the moment I have other priorities anyway 😉.
a
I dont use material and some names clash with my own components
r
+1, very interested in this too. I have a fully custom Compose Desktop UI toolkit, and would rather not have the overhead of material in my app. I don't use it, except for accidentally due to name clashes....
💯 2
e
a
Revisited this. What brings material to the app is
compose.desktop.currentOs
and
compose.desktop.common
You can remove them by doing:
Copy code
implementation(compose.desktop.currentOs) { // also for .common if u use it
    exclude("org.jetbrains.compose.material")
    exclude("org.jetbrains.compose.material3")
}
👍 2