buildship icon indicating copy to clipboard operation
buildship copied to clipboard

'files' dependencies should be added to the module path when applicable

Open nlisker opened this issue 1 year ago • 0 comments

Dependencies declared as implementation files("lib/my.jar") are not added to the module path even if my.jar declares a module-info.

Expected Behavior

The jar should be added to the module path, just like other dependencies.

Current Behavior

The modular jar is added to the classpath.

Context

Sometimes flat files dependencies are needed, like when bundling your own dependencies. These can be modular and should be added to the module path as is done with dependencies that are taken from a repository.

Steps to Reproduce

Create a modular project (with module-info) and add a files dependency to a modular jar and a group dependency to a modular jar in a repo (jackson, junit...). Then refresh the gradle project and go to its build path and expand Project and External Dependencies; observe which dependency is on the module path and which is on the classpath.

Your Environment

Gradle 8.7 Buildship 3.1.9 Eclipse 03-2024

nlisker avatar Apr 07 '24 01:04 nlisker