redhat-developer / redhat-developer/vscode-java
Custom gradle configurations are not properly picked up
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
Details
We have a module which generates JOOQ sources and compiles them into java classes.
The module also contains some classes under a/src/main/java which help to produce the JOOQ sources as part of the compileJava task.
So we have something like this in our A module:
val generatedDbDataJar: Configuration by configurations.creating {
isCanBeConsumed = true
isCanBeResolved = false
extendsFrom(configurations["implementation"], configurations["runtimeOnly"])
}
And in our B module we have something like this which consumes it:
implementation(project(mapOf("path" to ":A")))
implementation(project(mapOf("path" to ":A", "configuration" to "generatedDbDataJar")))
This setup works absolutely fine if you run ./gradlew build, in Eclipse and in IntelliJ.
However, in Cursor or VSCode the setup above does not work and the produced classes are not recognized in module B and are showing as "missing" classes in the IDE.
It looks to us like this is a bug, unless there's a specific configuration for this case?
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
Start by reproducing the two-module setup with module A's generatedDbDataJar configuration and module B's project dependencies, then compare ./gradlew build with the VS Code or Cursor import. Trace how the Java extension handles custom Gradle configurations and verify that generated classes from A are resolved in B; done means those classes are recognized without IDE errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, vscode
- Domain
- build-system, developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100