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

Gradle projects compile to bin/ instead of build/ #2338

Open
brunovieira97 opened this issue Mar 3, 2022 · 5 comments
Open

Gradle projects compile to bin/ instead of build/ #2338

brunovieira97 opened this issue Mar 3, 2022 · 5 comments

Comments

@brunovieira97
Copy link

Gradle projects default their builds to build/, however the vscode plugin compiles a completely separate version of all the class files to bin/, so it does require adding a completely separate directory to source control, along with actually performing all the compiles twice (once for gradle, and once for vscode).

Originally posted by @ThadHouse in #466 (comment)

@brunovieira97
Copy link
Author

Was looking for a solution for my problem when I stumbled upon this mentioned comment.

The problem here is the Java extension for VS Code compiles binaries to bin/ directly.

Is there a way for VS Code to follow Gradle's settings for the build folder?

@snjeza
Copy link
Contributor

snjeza commented Mar 3, 2022

@brunovieira97 You may want to take a look at eclipse-buildship/buildship#1131

@brunovieira97
Copy link
Author

Wasn't aware of this Buildship project.

However, Maven support does not seem to be affected at all. AFAIK, it just compiles binaries directly to target/, same as Eclipse (in this case, VS Code).

@snjeza
Copy link
Contributor

snjeza commented Mar 3, 2022

@Lassebq
Copy link

Lassebq commented Aug 27, 2024

I don't think java extension even uses gradle to build these classes. I have registered a task with

classes.finalizedBy mergeMethods

And none of the changes got applied by this task.
Additionally, debug extension uses bin/ for runtime classpath which caused issues due to my task not applying these changes

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

No branches or pull requests

4 participants