Skip to content

Gradle dependency refactor #5561

@tomatoishealthy

Description

@tomatoishealthy

Rationale

The java-tron code has been refactored once and is currently divided into multiple modules:

  • actuator: transaction module
  • chainbase: DB module
  • common: common base module
  • consensus: consensus module
  • crypto: encryption module
  • framework: architectural organization
  • protocol: definition of core protocol data structure and API
  • plugins: toolset

Each module has its own dependencies, but currently there are situations where multiple modules reference the same dependency at the same time, which means the same dependency is declared multiple times in multiple build.gradle files.

For example:
Most of all the modules contain this dependency:compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69' . Some dependencies in different modules even don't adopt the same version which makes it more chaotic.

There are some drawbacks to this situation:

  1. Bringing additional maintenance costs to development
  2. It is impossible to clearly identify which version of dependency the final Fullnode.jar references
  3. Additional work is added to system maintenance. For example, during daily security inspections, there may be false positive reports of vulnerabilities.

Therefore, this issue aims to solve the problem of dependency confusion and manage dependencies in a unified manner.

Implementation

  • TODO: The detailed dependency sorting and reconstruction plan will be posted later.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions