It's quite confusing that the Android Studio templ...
# compose-wear
l
It's quite confusing that the Android Studio templates for Wear OS apps give these keys in the version catalog. It creates great ambiguity with compose dependencies that are not meant for watches, I'm not sure people would even notice and which situations they could find themselves blob thinking fast
Copy code
androidx-compose-material = { group = "androidx.wear.compose", name = "compose-material", version.ref = "composeMaterial" }
androidx-compose-foundation = { group = "androidx.wear.compose", name = "compose-foundation", version.ref = "composeFoundation" }
a
Will take a stab at this to remove the ambiguity
l
🙏🏼 You're at Google?
yes black 1
This other example of confusing keys might help you:
Copy code
androidx-ui = { group = "androidx.compose.ui", name = "ui" }
androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
Here, compose is not even mentioned. I'd expect those keys instead:
Copy code
androidx-compose-ui = { group = "androidx.compose.ui", name = "ui" }
androidx-compose-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
androidx-compose-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
I think the problem is that it takes only the first part of the group, while it should take all of it, minus the start if it's a well-known TLD (
org.
,
com.
,
net.
,
io.
,
app.
), and should only ditch words that are duplicated in the artifact name (e.g.
android.fragment:fragment-ktx
should have the key
androidx-fragment
rather than
androidx-fragment-fragment
.
In the case of Compose, I think I'd be fine if
androidx
was omitted, BTW, not sure what you think, but either way, it'd be better than the current situation.
Hello @Ankit, did you ever get to something? I just created a new project with Android Studio (Jellyfish Canary 10), and I still get those ambiguious keys:
androidx-ui = { group = "androidx.compose.ui", name = "ui" }
a
I am really sorry, this slipped my mind. I did talk with the team responsible for fixing this but forgot to create a tracker bug with them. If you have the latest generated file, can you please share here, if thats fine with you? I will create the bug with the details Again sorry for missing this 😢