Is there any way to specify the latest version of a library in your grade file, rather than hard coding a version number? e.g. on iOS platform we have dependency management platforms like CocoaPods that have syntax for specifying this kind of thing.
r
r4zzz4k
12/24/2017, 4:20 PM
"group:name:+"
(or
"group:name:2.+"
for example), but this practice is discouraged as it doesn't allow you to produce repeatable builds. I'd suggest you to find and use Gradle plugin which allows you to check if dependencies are updated by invoking gradle task like https://github.com/ben-manes/gradle-versions-plugin
f
fuad
12/25/2017, 5:35 PM
thank you! This is exactly what I was looking for.
fuad
12/25/2017, 5:36 PM
With CocoaPods we can issue a command to see what updates, if any are available, and then selectively update whatever libraries we want
r
r4zzz4k
12/25/2017, 6:26 PM
Gradle doesn't have this included, but it's much more open and extensible AFAICT. It's hard to do automatic updating though because Gradle config is script, not just static structured configuration, so dependencies can be added in quite obscure ways and the tool won't be able to properly change code in config file. But you can simply declare versions inline or have them all in one place as variables so manual updates are easy based on report of mentioned plugin.
r4zzz4k
12/25/2017, 6:29 PM
If you prefer maintainability over flexibility and ease of configuration you can look into using Maven directly -- it's configured via xml and also has a great community and infrastructure.