libaums icon indicating copy to clipboard operation
libaums copied to clipboard

Provide constants file for gradle dependencies

Open ChernyshovYuriy opened this issue 4 years ago • 6 comments

This change introduces single constants.gradle file that contain all versions necessary for gradle dependencies used in different modules. The goal is to avoid copy/paste and have them controlled in one place. It also contain optimization inside gradle files, such as exclude not used properties, etc ... All tests are passed localy.

ChernyshovYuriy avatar Feb 11 '21 16:02 ChernyshovYuriy

Hi, While I do agree that this is a lot cleaner, I noticed that defining dependencies like that breaks updating to the latest version via Alt+Enter in JetBrains IDEs. Since doing it manually is tedious, I usually stick with defining them inline.

Are there any additional benefits or is it just for having everything in one place?

depau avatar Feb 11 '21 19:02 depau

Hi, While I do agree that this is a lot cleaner, I noticed that defining dependencies like that breaks updating to the latest version via Alt+Enter in JetBrains IDEs. Since doing it manually is tedious, I usually stick with defining them inline.

Are there any additional benefits or is it just for having everything in one place?

Hey, I use Android Studio and it takes care of such approach pretty well. I am curious why JetBrains doesn't as Android Studio is based on that. There are no other benefits, I found it very difficult to manage in many places and provided solution. Also, some dependencies are not necessary for some modules.

ChernyshovYuriy avatar Feb 11 '21 19:02 ChernyshovYuriy

Speaking about software engineering, the one should not rely on any IDE when provide solution. Today it is JetBrains IDE, yesterday it was NetBeans and Eclipse, tomorrow it will be something else. Moreover, I personally work with some engineers who do not use any IDE at all. Linux, command line and libraries - all you need. Same here, there is a source and there is a build system. My changes addresses critical issue in software engineering when constants defining versions of libraries are spread all over the build files as well as test related and obsolete libraries are used in places where they are not needed. Hope it clears a bit my intention behind this pull request.

ChernyshovYuriy avatar Feb 12 '21 12:02 ChernyshovYuriy

Hey @ChernyshovYuriy

thanks for your contribution and sorry for taking incredibly long getting back to you.

But I am acutally with @Depau, in Android Studio, the Alt + Enter thingy does not work anymore. In fact, Android Studio does not even show an outdated version anymore.. Can you expand how you did that in Android Studio?

magnusja avatar May 12 '21 22:05 magnusja

Hey, thanks for getting back. I always use the latest version of Android Studio and it does work perfectly. Screenshot from 2021-05-13 09-41-43 Screenshot from 2021-05-13 09-41-34 Screenshot from 2021-05-13 09-41-30

ChernyshovYuriy avatar May 13 '21 13:05 ChernyshovYuriy

You can see which dependencies are out of dated. Despite the IDE, what I am trying to show in my pull request is approach to centralize constants and control versions from single place. As engineer, I don't tight my solutions to particular IDEs.

ChernyshovYuriy avatar May 13 '21 13:05 ChernyshovYuriy