Which syntax would you prefer for dependencies dec...
# refreshversions
l
Which syntax would you prefer for dependencies declaration? 1️⃣:
Copy code
AndroidX.emoji
AndroidX.emoji.appCompat
2️⃣:
Copy code
AndroidX.emoji
AndroidX.emojiAppCompat
Telling why your prefer on or another choice in this thread can help too 🙂 FYI, the solution number two is the current ont, but please, don't base your choice on what's there currently in refreshVersions.
2️⃣ 3
1️⃣ 3
m
I would prefer syntax 1 since, even though I don't need it that often, it allows me to see the groupId/artifactId directly.
l
@molikuner How does it allow you to see groupId/artifactId directly?
You mean it allows you to see separate parts from the artifact name more clearly?
m
Well I'm not 100% sure about the artifact I'd, but I would assume that the group id is
androidx.emoji
in that example.
l
Oh I see, that's right
I'm wondering what I should do for the ktx artifacts too
If I should keep it as is
AndroidX.activityKtx
or
AndroidX.activity.ktx
. I am leaning towards the former because you see straightaway from auto-complete that there's a ktx version.
m
From auto-completion perspective the version without the extra dot will always win, but I would not make any exception for ktx there, otherwise it might get confusing.
l
Why would you not make the exception? How do you find it confusing if ktx artifacts are consistenly without the dot needed?
m
From user perspective, I think, I would not realize why the decision was made, that the ktx dependencies are without the dot, but all other dependencies are with the dot. Also it happens to me sometimes, that I break the build file and the IDE doesn't help anymore. Then I would like to have a solution that is the same as for other dependencies.
l
Well, wouldn't you just see it because you discovered the existence of a
ktx
artifact faster?
m
Maybe. I think you managed to change my mind about the original question. 😄 Probably I should value auto-completion higher than the rare case that I read build files to find the exact groupId/artifactId.
l
I think you changed my mind too. Having the group suffixed with a dot for extra non ktx artifacts can be nice to understand the groups hierarchies.
😂 1
Even though AndroidX has no logic when it comes to version sync of these said groups and members of these groups (which is partly why I worked on refreshVersions in the first place)
n
from a point of IDE autocompletion having artifacts at different levels could make things confusing
l
It's almost a draw 🤔
Tough decision
And I realized I have
AndroidX.core.ktx
in place of
AndroidX.coreKtx
on the
develop
branch. I could have an
@HasKtx
or alike documented annotation to have it shown in the KDoc popup on hover.
n
my opinion has been changed by the disussion i choose 1️⃣ when
AndroidX.emoji
is a group and not a artifact otherwise 2️⃣
i most likely won't use android in the near future but this also affects the ktor features and such