LibertyBans icon indicating copy to clipboard operation
LibertyBans copied to clipboard

Create a gradle build and see if it works out better than the current Maven build

Open A248 opened this issue 4 years ago • 4 comments

A248 avatar Sep 11 '21 03:09 A248

any progress?

BlueTree242 avatar Jun 21 '22 20:06 BlueTree242

None so far. But that does not mean it cannot be accomplished. As said prior:

This is an astronomical task, although it can be done; we can reach the stars if we dedicate ourselves to the effort.

A248 avatar Jun 21 '22 21:06 A248

Points in favor of gradle:

  1. Changing the version string does not require modifying every build file
  2. Modifying the build hash could potentially be automated
  3. Repositories can be constrained to supply only their intended dependencies, a security bonus especially in the repository-abundant Minecraft-related ecosystem, as well as a solution for the horrific Jitpack repository
  4. Automation of cross-module dependence, such as inclusion of addon dependencies in the addon-integration module or platform dependencies in distribution modules; which reduces the maintenance burden and learning curve for maintainers and new collaborators
  5. Fabric support becomes feasible
  6. Conveniently writing dynamic build-related code opens up new possibilities

Cons:

  1. Replacing usage of maven-invoker requires running tests with different dependencies manually. Although, such integration tests may actually become easier, and IDE support improved
  2. No straightforward replacement for the maven-enforcer-plugin
  3. Need to rework source filtering
  4. Need to rework database integration tests
  5. Need to relearn Flyway and JOOQ code generation
  6. Need to learn the Gradle build system more generally
  7. Have to keep the build system up-to-date because Gradle moves fast (breaking changes are frequent) and I don't want to be stuck on an older Gradle version which becomes painful for contributors and maintainers
  8. Have to choose between the Groovy and Kotlin DSLs and learn one or both of them, at least both to some extent
  9. Opportunity cost of spending all this time on potentially more useful improvements to LibertyBans and its codebase

A248 avatar Jul 22 '23 16:07 A248

There are more benefits of Gradle. Our build becomes more dynamic, which can enable saving resources #226 . Gradle is reputed to be more performant. Basic elements of Maven are inflexible; the Maven team's historical inability to plan properly wastes our time: https://github.com/A248/LibertyBans/pull/225.

And if we ever wanted to create a build plugin for LibertyBans API users to test their code's integration against a running instance of the fully-implemented LibertyBans API, Gradle would be far more suitable, considering its much improved API.

A248 avatar Jul 31 '23 14:07 A248