Skip to content

Custom gradle configurations are not properly picked up #4039

@steve-todorov

Description

@steve-todorov

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions