eclipse / buildship

The Eclipse Plug-ins for Gradle project.
530 stars 169 forks source link

`runtimeOnly` is incorrectly involved in the compilation path #1229

Open mozhuanzuojing opened 1 year ago

mozhuanzuojing commented 1 year ago

There is a multi-module project where module A compiles without relying on module B. When debugging module A, the evaluation expression has an error when the class of module B, to solve this problem, I added module B to the runtime classpath of module A. But when I test referencing module B's class in module A's code, it compiles, which means that module B is participating in module A's compilation classpath

// A/build.gradle
plugins {
    id 'java-library'
    id 'eclipse'
}

dependencies {
      runtimeOnly project(':B')
}

Expected Behavior

Module B is only in the runtime classpath of Module A

Current Behavior

Module B appears in the compilation classpath and runtime classpath of module A

Context

Steps to Reproduce

Your Environment

Version: 1.76.1 (system setup)
Commit: 5e805b79fcb6ba4c2d23712967df89a089da575b
Date: 2023-03-08T16:32:00.131Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Windows_NT x64 10.0.22621
Sandboxed: Yes

image