redhat-developer / redhat-developer/vscode-java
Dependency with scope test in gradle falls into the main classpath
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2.3k
- Forks
- 546
- Ø Merge
- 20 Std. 1 Min.
- Gemergte PRs (30 T.)
- 11
Beschreibung
[provide a description of the issue]
Environment
- Operating System: MacOs
- JDK version: 17
- Visual Studio Code version: 1.93.1
- Java extension version: v1.34.0
Steps To Reproduce
The gradle project. If there is a dependency on another module in a multi-module project with scope test, then this dependency falls into the main classpath.
Current Result
In build.gradle.kts
testImplementation(project(":backend:core:model"))
testImplementation(project(":backend:core:ports"))
In .classpath of this module
<classpathentry kind="src" path="/ports">
<attributes>
<attribute name="gradle.buildServer" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="/model">
<attributes>
<attribute name="gradle.buildServer" value="true"/>
</attributes>
</classpathentry>
Expected Result
In .classpath of this module
<classpathentry kind="src" path="/ports">
<attributes>
<attribute name="test" value="true"/>
<attribute name="gradle.buildServer" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="/model">
<attributes>
<attribute name="test" value="true"/>
<attribute name="gradle.buildServer" value="true"/>
</attributes>
</classpathentry>
Additional Informations
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem Multi-Modul-Gradle-Projekt und prüfe build.gradle.kts zusammen mit den generierten .classpath-Einträgen. Reproduziere das Verhalten der testImplementation-Abhängigkeit und überprüfe anschließend, dass betroffene Quelleneinträge das Attribut test=true erhalten und gradle.buildServer=true beibehalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- build-system
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100