HabitRPG / habitica-android

Native Android app for Habitica
GNU General Public License v3.0
1.41k stars 508 forks source link

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

Open jsoberg opened 2 months ago

jsoberg commented 2 months ago

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.