Suggestion Needed Should we use buildSrc for depen...
# android
i
Suggestion Needed Should we use buildSrc for dependencies in 2022? or should we go with ext for versioning?
p
The version catalog is the standard way to go
๐Ÿ‘ 1
โ˜๏ธ 1
v
ext
is basically almost always the wrong answer, no matter the question. Every time you even think about using
ext
, you should feel dirty and make it properly instead. ๐Ÿ˜‰
i
๐Ÿ˜‚ , In last project we have used
buildSrc
for dependencies, but updating library still is an issue. only reason I see to using
ext
is you can easily know the new version available and AS recognize in module setting. but still donโ€™t want to use
ext
๐Ÿ˜‚
p
The version catalog is the standard way to go
Really, this โ˜๏ธ
๐Ÿ‘ 1
i
ya I am considering this, but how about updating the library? @Paul Woitaschek
p
You either increment the version or use sth like renovate
v
What do you mean by "updating the library"? Whether you have it in
buildSrc
or in a local variable, or in an
ext
property, or in a version catalog, doesn't really make a difference, does it? You increase the version and are good. And you can use some tool like renovate or dependabot or whatever that does the version increases for you, or you can also simply use some plugin that tells you what is out dated like the Gradle Versions plugin of Ben Manes which I usually prefer.
๐Ÿ‘ 2
a
I believe he is referring to the standard "newer version available" highlighting that comes with android studio out of the box, which doesnt work with buildSrc variables for version
๐Ÿ™Œ 2
v
if that's the case, then neither
buildSrc
nor version catalogs are supported: https://www.jetbrains.com/help/idea/package-search-build-system-support-limitations.html#gradle_support But according to https://youtrack.jetbrains.com/issue/IDEA-277582#focus=Comments-27-5173902.0-0 they should be working on supporting it now that version catalogs became stable.
๐Ÿ‘ 3