redhat-developer / redhat-developer/vscode-java
Compilation error : Java is picking wrong version for dependency resolution for gradle projects
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
[Java is picking wrong version for dependency resolution for gradle projects]
Environment
- Operating System: MAC M1
- JDK version: 17
- Visual Studio Code version: latest
- Java extension version: latest
Steps To Reproduce
My Project is working with intellij but not in the vscode
(check image below)also the junit 4.3 is registed as dependency in the nested project build.gradle file and 4.2 is transitive dependency
the transitive dep is prioritizing the the registered version
because of this im getting errors in java file
- [step 1] create a gradle nested project and add same dependency (transitive) with different versions
- [step 2] this plugin is resolving the lowest version of plugin instead of greatest version of above
Current Result
Expected Result
4.3 should be taken priority than 4.2
Additional Informations
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with a nested Gradle project on macOS using JDK 17, following the described dependency declarations in the nested project's build.gradle. Compare the resolved versions for the direct 4.3 dependency and transitive 4.2 dependency with IntelliJ and VS Code. Done means VS Code resolves and uses 4.3, without the reported Java-file errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100