Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide constants file for gradle dependencies #286

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ChernyshovYuriy
Copy link

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.

Yurii Chernyshov added 2 commits February 11, 2021 11:27
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.
@depau
Copy link
Collaborator

depau commented Feb 11, 2021

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?

@ChernyshovYuriy
Copy link
Author

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
Copy link
Author

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.

@magnusja
Copy link
Owner

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?

@ChernyshovYuriy
Copy link
Author

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants