Skip to content

Automatically add module information to launch config #929

@tobiasdiez

Description

@tobiasdiez

When using a gradle project which is modularized, the launch configuration needs to include proper add-modules arguments for each dependency in order for the compilation to work. These should be automatically added by vscode-java.

Environment
  • Operating System: Win 10
  • JDK version: 14
  • Visual Studio Code version: 1.47
  • Java extension version: 0.27.1 (debugger)
Steps To Reproduce
  1. Open modularized project that uses gradle
  2. Create default "Launch" config
  3. Try to run the project

Sample project: JabRef

Current Result

Errors because dependency modules are not found.

Expected Result

Automatically add add-modules statements to the java compiler so that dependencies are found.

Additional Informations

In addition, it would be good if the configuration of org.beryx.jlink is automatically recognized and the right add-opens and add-exports cmd args are added:
https://github.com/JabRef/jabref/blob/00a4fb2136a573e1c6c34fc7b5c779b2d88d9636/build.gradle#L387-L423

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions