Hi all, After working with Fineract for some months now, I collected several issues related to the Gradle build system we have in place. I categorized my pain points, and would like to initiate a discussion on the topic with the community. My usage scenarios include building locally with IntelliJ+Gradle wrapper, building locally from CLI and using the Github build from the web UI.
The problems I gathered fall into the following categories: - *REPEATABLE BUILDS:* starting Fineract from IntelliJ always fails for the first time with: Caused by: java.lang.IllegalArgumentException: Couldn't bind FineractProperties to the 'fineract' property and simply trying it again always makes it wor0k. - *DIRTY CHECKS*: modifying a single file (eg. put a newline character into the Loan class) and restarting Fineract makes it "build" for 17-18 seconds (checking all modules to be up-to-date) before starting it again. This happens on my 16 core Intel i7 HQ CPU with 64Gb of RAM, eating up to 800% CPU and spinning up all the vents in my rig while doing so. - *INTEGRATION TESTS*: the same dirty check problem happens when working with tests as well. Adding a blank line to an existing test class and re-running the test again happens after a ~20 seconds "rebuild" process. This leads to painfully slow code-test cycles at local development. - *RESOURCE REQUIREMENTS*: local team reports that in cases the Gradle daemon repeatedly grows up to 8Gb memory usage. That causes issues with dev boxes having 16Gb or even less RAM.. Even using my high-spec dev box, I needed to add GRADLE_OPTS="-Dorg.gradle.workers.max=12 -Dorg.gradle.priority=low" to keep my desktop responsible during local builds. - *CACHING*: I see many team members and mailing list members recommending `--no-build-cache --no-daemon` settings when invoking gradle, to avoid issues with our build. This kind of denies even any potential adventages of using Gradle over more stable build tools. Note, that I do not use these settings (so my issues are definetely not caused by this), but I keep getting this recommendation for a reason. - *CONSOLE READABILITY*: I also see many fellow devs suggesting running gradle with `--console=plain` to get some chance to read the logs in a sensible way. Still, when eg. 2 tests fail out of the 1100+ on a Github build, it's a horror to find out which ones failed, and our best bet is to text-search for "FAILED" in the 17000+ lines of output. - *REPORTING COMPILE ERRORS*: related to the previous point, check https://github.com/kjozsa/fineract/actions/runs/10302318345/job/28515733682 for a perfect example. Here at line 1489 Gradle shows > Task :fineract-loan:compileJava FAILED and shows a couple of warnings below, but the actual error is shown at line 1393 which appears to be part of > Task :fineract-document:modernizer which is clearly misleading, and your best bet to find the actual error on Github is to search for "error: ", but NOT using Ctrl+F, but the search box at the top right corner. That's ridiculous - a sensible build tool should communicate build errors in a straightforward way. I'd like to ask you to share your experiences and pain points with the current build that we have and use every day. Once we have a clearer understanding of the areas that need improvement, we can discuss potential strategies to revise our build system and ensure it meets basic requirements.To be fair, please also make sure you share any recent positive experiences related to Fineract builds, if you have any. Thanks, Kristof