quarkiverse / quarkus-openapi-generator

OpenAPI Generator - REST Client Generator
Apache License 2.0
118 stars 80 forks source link

Source Root not detected by intellij when building with gradle #791

Open rmanibus opened 2 weeks ago

rmanibus commented 2 weeks ago

As stated in the title, the generated source root is not detected by intellij when building with gradle

I am not sure if this problem is coming from this plugin or from quarkus itself.

The project compile correctly, but intellij does not recognize the generated source root,

Quick fix is to add the following to build.gradle:

sourceSets {
    main {
        java {
            srcDirs "$buildDir/classes/java/quarkus-generated-sources/open-api-json"
        }
    }
}
rmanibus commented 2 weeks ago

reproducer: https://github.com/rmanibus/quarkus-openapi_791

The project build but the source root is not present in intelliJ

ricardozanini commented 1 week ago

That doesn't happen on Maven. I'd say that might be related to the Gradle plugin maybe? If there's a way to configure it on the project side, we can try it. I don't use Gradle myself, so any contributions are welcome.