68
hanuor
7y

Today I took the risk of upgrading my gradle to a newer version

5 and a half hours later I figured it was a bad decision.

:/

Comments
  • 2
    dafuq! 5 hours? why?
  • 1
    I'd consider that on the low side!

    Every time there is an Xcode or Gradle upgrade, it's mostly one day to one week lost (though I have 10 apps and a CI server to babysit).
  • 0
    Never touch a running system!
  • 0
    ... some folks say he's still updating gradle to this very day.
  • 0
    Gradle is one of the build systems that you just love to hate, I mean you can do a lot of stuff with, but it's just so fucking difficult to maintain and use
  • 1
    Lol, wtf does the build system version has to do with updating all dependencies?!?
  • 0
    @azous Try doing it and you'll know
  • 1
    I had just upgrade it to the latest one and it took 30 mins maximum on Android studio
    I guess there is something wrong on your computer
  • 2
    @hanuor lol, never considering gradle over maven again...
  • 1
    @azous Gradle is not a dependency, it's the build system. Updating it means some things can become deprecated, flat out removed, or not working for whatever reason (new way to do things). Sometime it goes without issue, and sometime it's hell.

    @Mba3gar congrats, you probably have a simple enough build with nothing too strange there. That's good for you. But unfortunately, that's not the case for everyone, cruft and work-around have accumulated, and updating it can be a pain. That's not a problem with the computer.

    I guess some pains are hard to reason about if you don't experience them.
  • 1
    @Fradow yep, read my comment again.

    The only reason I can see upgrading a build system taking fucking 5 hours is if it re-downloads all dependencies.
    I use maven daily and "upgrading" it is just download->untar->profit ...
  • 1
    Perhaps I should be more specific, here are a few issues I got updating Gradle (for an Android project):

    - build doesn't find dependencies anymore. Find out that now you need to add google() repository about everywhere

    - "compile" instruction deprecated, now you have to use "implementation" OR "api". Try to understand the difference, resort to testing what works

    - << deprecated, now need to use "doLast"

    - got to find which build tools version do work with new Gradle version

    Multiply by 10 apps.

    Then, last one took me a full day to find out: Android Studio craps out and try to use an older Gradle version there is NO reference to anymore whatsoever, seem to be a bug when you update Android Studio (works fine in CLI and on brand new computer with new install).

    Notice I didn't talk a single time about downloading or fixing dependencies there. That part was thanksfully painless for me.
  • 1
    I was tasked with upgrading gradle of our project. It was a pain but I could make it work. I've merged to master, let's see what happens😄
Add Comment