Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rmanibus opened this issue Sep 11, 2024 · 4 comments
Open

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

rmanibus opened this issue Sep 11, 2024 · 4 comments

Comments

@rmanibus
Copy link
Contributor

rmanibus commented Sep 11, 2024

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
Copy link
Contributor Author

rmanibus commented Sep 11, 2024

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

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

@ricardozanini
Copy link
Member

ricardozanini commented Sep 17, 2024

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.

@ngoduongkha
Copy link

Hi @rmanibus, I am facing the same issue as you. Would you happen to have any solutions?

@rmanibus
Copy link
Contributor Author

rmanibus commented Oct 3, 2024

The quick fix mentioned in my message is working (you might have to add other folders, this is only for json)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants