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

[Suggestion] Update project Gradle setup (move to version catalogs, add shared build-logic) #2075

Open
jsoberg opened this issue Jun 25, 2024 · 2 comments · May be fixed by #2093
Open

[Suggestion] Update project Gradle setup (move to version catalogs, add shared build-logic) #2075

jsoberg opened this issue Jun 25, 2024 · 2 comments · May be fixed by #2093

Comments

@jsoberg
Copy link
Contributor

jsoberg commented Jun 25, 2024

Hey all! I have a few improvement suggestions that I wouldn't mind opening some PRs for surrounding the Gradle build logic setup for the project:

  1. Move to using version catalogs (Gradle docs and Android docs) for dependencies. This provides a central file for defining dependencies/versions, making them accessible in a type-safe manner (through libs.X).

  2. Create a new module for storing shared build logic (example). I noticed some duplicate code in build files (one example being adding build config fields in wearOS and Habitica) which would be a good first step into moving to a shared function that any build script in the project could use. In the future, this could be used to create convention plugins and other shared build logic/setup between modules as desired.

Let me know if you think these additions would be worthwhile for the project and I'll start working on PRs for them.

@phillipthelen
Copy link
Member

Hello @jsoberg,

Sorry for the late response. This would be great if you are still interested in working on this! We already have a shared module, but from what I understand your proposal for 2 would be something different from that and just regarding code sharing for the build scripts, right?

@jsoberg
Copy link
Contributor Author

jsoberg commented Oct 26, 2024

Hey @phillipthelen! That's right, the shared build-logic module would just be to share build configurations between modules (e.g. multiple modules setup Android similarly, and this could be a plugin in that build-logic). Version catalogs are just moving external dependencies to a central location (gradle/libs.versions.toml) that can be accessed in a typesafe/IDE-friendly way - ensures you're using similar versions in each module, and makes it easier to track updates

@jimlyas jimlyas linked a pull request Nov 22, 2024 that will close this issue
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 a pull request may close this issue.

2 participants