eclipse / buildship

The Eclipse Plug-ins for Gradle project.
528 stars 167 forks source link

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

Open nlisker opened 4 months ago

nlisker commented 4 months ago

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