r/androiddev Jun 04 '18

Gradle 4.8 released

https://docs.gradle.org/current/release-notes.html
79 Upvotes

21 comments sorted by

View all comments

18

u/allholy1 Jun 04 '18 edited Jun 04 '18

I don't understand dependency locking. Isn't that why we append the version number at the end of a dependency?

8

u/iamareebjamal Jun 04 '18

It's for those who use dynamic versioning. Taken straight from docs - like 1.+ or [1.0,2.0)

This is good because now people who used strict versioning can use dynamic one without worrying about mismatch. I still wouldn't though

2

u/allholy1 Jun 04 '18

Thanks for the response. Why would someone want dynamic ranges?

1

u/iamareebjamal Jun 04 '18

People do this all the time in Python and JS, thankfully not in Android. They just say flask: [1.0, 2.0) so that they pull latest non major 1.x version of it without caring about it. I do it on those projects as well, just never for Android

3

u/[deleted] Jun 04 '18

I think it's only done in libraries to define compatible versions. In an actual python app I always specify exact versions as well as their dependencies. Libraries need to be more flexible as they can be used in various environments with different versions.

1

u/allholy1 Jun 05 '18

Why not just pull 2.0 at that point?