redhat-developer / redhat-developer/vscode-java
Dependency with scope test in gradle falls into the main classpath
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 2.3k
- Fork
- 546
- Merge medio
- 20h 1m
- PR unite (30g)
- 11
Descrizione
[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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con il progetto Gradle multimodulo e ispeziona build.gradle.kts insieme alle voci .classpath generate. Riproduci il comportamento della dipendenza testImplementation, quindi verifica che le voci sorgente interessate ricevano l’attributo test=true mantenendo gradle.buildServer=true.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- build-system
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100