apache / apache/eventmesh

[Enhancement] Use gradle version catalog instead of using a library declaring the dependencies in build scripts.

Open
#4,512 3 comments 0 reactions 0 assignees View on GitHub
enhancement Stale
Dominant language
Java
Stars
1.8k
Forks
658
Avg merge
11h 29m
Merged PRs (30d)
52

Description

### Search before asking

- [X] I had searched in the [issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no similar issues.

### Enhancement Request

A version catalog provides a number of advantages over declaring the dependencies directly in build scripts:

- For each catalog, Gradle generates type-safe accessors so that you can easily add dependencies with autocompletion in the IDE.

- Each catalog is visible to all projects of a build. It is a central place to declare a version of a dependency and to make sure that a change to that version applies to every subproject.

- Catalogs can declare [dependency bundles](https://docs.gradle.org/current/userguide/platforms.html#sec:dependency-bundles), which are "groups of dependencies" that are commonly used together.

- Catalogs can separate the group and name of a dependency from its actual version and use [version references](https://docs.gradle.org/current/userguide/platforms.html#sec:common-version-numbers) instead, making it possible to share a version declaration between multiple dependencies.

For version management in the current project, under sub-modules, many manual declarations or placeholders are used for dependency declarations, resulting in too fragmented dependency declarations.

For example, the existing dependency declaration scheme:
- eventmesh-admin/build.gradle,line 66,67,69,70,71,73,75
image

Catalog is a global dependency declaration and management method recommended by [gradle officials](https://docs.gradle.org/current/userguide/platforms.html), so i think we should use Catalog for version management instead of using a library declaring the dependencies in build scripts.

### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) *

Contributor guide

Open the contributing guide

Research direction

Start with eventmesh-admin/build.gradle around lines 66-75, then inspect the dependency declarations under the other submodules and the Gradle version catalog documentation linked in the issue. Move the fragmented dependency versions into a central catalog and update the build scripts to use it. Done means the submodules use the catalog consistently and the project still builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.