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

Migrate hardcoded dependencies to version catalog #82

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

tuancoltech
Copy link
Collaborator

Migrate hardcoded dependencies to version catalog.

[Gradle version catalogs](https://docs.gradle.org/current/userguide/platforms.html) enable you to add and maintain dependencies and plugins in a scalable way. Using Gradle version catalogs makes managing dependencies and plugins easier when you have [multiple modules](https://developer.android.com/topic/modularization). Instead of hardcoding dependency names and versions in individual build files and updating each entry whenever you need to upgrade a dependency, you can create a central version catalog of dependencies that various modules can reference in a type-safe way with Android Studio assistance.

https://app.asana.com/0/1207819682524134/1208308884950165
https://developer.android.com/build/migrate-to-catalogs

app/build.gradle Outdated

implementation 'com.github.kirich1409:viewbindingpropertydelegate-noreflection:1.5.9'
implementation(libraries.viewbinding.property.delegate)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
implementation(libraries.viewbinding.property.delegate)
implementation(libraries.viewbinding.property.delegate.noreflection)

app/build.gradle Outdated

implementation 'dev.arkbuilders:arkfilepicker:0.1.1'
implementation 'dev.arkbuilders:arklib:0.3.3'
implementation(libraries.arkbuilder.arkfilepicker)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
implementation(libraries.arkbuilder.arkfilepicker)
implementation(libraries.arkbuilders.arkfilepicker)

app/build.gradle Outdated
implementation 'dev.arkbuilders:arkfilepicker:0.1.1'
implementation 'dev.arkbuilders:arklib:0.3.3'
implementation(libraries.arkbuilder.arkfilepicker)
implementation(libraries.arkbuilder.arklib)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
implementation(libraries.arkbuilder.arklib)
implementation(libraries.arkbuilders.arklib)

androidx-test-espresso = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidXTestEspresso" }
skydoves-balloon = { group = "com.github.skydoves", name = "balloon", version.ref = "skydovesBalloon" }
flexbox = { group = "com.google.android.flexbox", name = "flexbox", version.ref = "flexbox" }
arkbuilder-arkfilepicker = { group = "dev.arkbuilders", name = "arkfilepicker", version.ref = "arkFilepicker" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
arkbuilder-arkfilepicker = { group = "dev.arkbuilders", name = "arkfilepicker", version.ref = "arkFilepicker" }
arkbuilders-arkfilepicker = { group = "dev.arkbuilders", name = "arkfilepicker", version.ref = "arkFilepicker" }

skydoves-balloon = { group = "com.github.skydoves", name = "balloon", version.ref = "skydovesBalloon" }
flexbox = { group = "com.google.android.flexbox", name = "flexbox", version.ref = "flexbox" }
arkbuilder-arkfilepicker = { group = "dev.arkbuilders", name = "arkfilepicker", version.ref = "arkFilepicker" }
arkbuilder-arklib = { group = "dev.arkbuilders", name = "arklib", version.ref = "arkLib" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
arkbuilder-arklib = { group = "dev.arkbuilders", name = "arklib", version.ref = "arkLib" }
arkbuilders-arklib = { group = "dev.arkbuilders", name = "arklib", version.ref = "arkLib" }

fastadapter = { group = "com.mikepenz", name = "fastadapter", version.ref = "fastadapter" }
fastadapter-extensions-binding = { group = "com.mikepenz", name = "fastadapter-extensions-binding", version.ref = "fastadapter" }
fastadapter-extensions-diff = { group = "com.mikepenz", name = "fastadapter-extensions-diff", version.ref = "fastadapter" }
arklib = { group = "dev.arkbuilders", name = "arklib", version.ref = "arkLib" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant, should be removed

arklib = { group = "dev.arkbuilders", name = "arklib", version.ref = "arkLib" }
orbit-mvi-viewmodel = { group = "org.orbit-mvi", name = "orbit-viewmodel", version.ref = "orbitMvi" }
orbit-mvi-compose = { group = "org.orbit-mvi", name = "orbit-compose", version.ref = "orbitMvi" }
viewbinding-property-delegate = { group = "com.github.kirich1409", name = "viewbindingpropertydelegate-noreflection", version.ref = "viewbindingPropertyDelegate" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
viewbinding-property-delegate = { group = "com.github.kirich1409", name = "viewbindingpropertydelegate-noreflection", version.ref = "viewbindingPropertyDelegate" }
viewbinding-property-delegate-noreflection = { group = "com.github.kirich1409", name = "viewbindingpropertydelegate-noreflection", version.ref = "viewbindingPropertyDelegate" }

@tuancoltech
Copy link
Collaborator Author

@shubertm This PR's branch is managed in rebase-based strategy.
Please don't push merge commit to it.
I'll be hard-resetting it now.

@shubertm
Copy link
Member

shubertm commented Nov 10, 2024

@shubertm This PR's branch is managed in rebase-based strategy. Please don't push merge commit to it. I'll be hard-resetting it now.

So, would you please fix all issues I requested. Not all are fixed.

@tuancoltech
Copy link
Collaborator Author

@shubertm This PR's branch is managed in rebase-based strategy. Please don't push merge commit to it. I'll be hard-resetting it now.

So, would you please fix all issues I requested. Not all are fixed.

@shubertm You mean the changes you requested above?
I think all of them were fixed.
Could you do a git pull --rebase and check again?

@shubertm
Copy link
Member

@shubertm This PR's branch is managed in rebase-based strategy. Please don't push merge commit to it. I'll be hard-resetting it now.

So, would you please fix all issues I requested. Not all are fixed.

@shubertm You mean the changes you requested above? I think all of them were fixed. Could you do a git pull --rebase and check again?

Yes, the redundant dependency arklib is still there

@tuancoltech
Copy link
Collaborator Author

@shubertm This PR's branch is managed in rebase-based strategy. Please don't push merge commit to it. I'll be hard-resetting it now.

So, would you please fix all issues I requested. Not all are fixed.

@shubertm You mean the changes you requested above? I think all of them were fixed. Could you do a git pull --rebase and check again?

Yes, the redundant dependency arklib is still there

@shubertm arklib is being used in app/build.gradle line 93.

@shubertm
Copy link
Member

shubertm commented Nov 12, 2024

Yes, but in libs.versions.toml it is defined twice, line 39 and 64

@tuancoltech tuancoltech force-pushed the enhance/migrate_to_version_catalog branch from 12a782b to 510a0e3 Compare November 12, 2024 05:34
@tuancoltech
Copy link
Collaborator Author

tuancoltech commented Nov 12, 2024

Yes, but in libs.versions.toml it is defined twice, line 39 and 64

@shubertm That's a good catch!
Removed it now.

Copy link
Member

@shubertm shubertm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good now 🚀

@tuancoltech tuancoltech merged commit 16286ba into main Nov 13, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants