Elffuss BraidHub

kikocis/EDC public

main · 1.5 KiBSourceRawPermalink

Dependency analysis

Decision

The CI workflow is extended with two Gradle tasks for analyzing EDC module dependencies:

The tasks are initially set to only emit warnings, but will be configured to fail builds once all warnings have been resolved.

The tasks are run in the CI workflow.

Rationale

The Gradle Java library plugin defines a clear separation between configurations. This allows controlling and limiting the use of transitive dependencies.

The Java library plugin introduces the concept of ABI (Application Binary Interface) which includes (among others) types used in public methods. Dependencies that define those types should be defined in the api configuration. Other dependencies should be defined in the implementation configuration so that they are not transitively exposed, and therefore do not leak into the consumers' compile classpath.

The Dependency Analysis Gradle Plugin analyzes the abstract syntax tree to determine the ABI. On that basis, it can recommend which import configurations should be changed.