Background/Situation
The Java and Kotlin by IntelliJ IDEA extension for VS Code and Cursor detects the build tool automatically when it imports a project. The intellij.buildTool setting selects the build tool explicitly. Use it when the project folder contains files for several build systems, or when the detected build tool is wrong.
Question
How to change the build tool that the extension uses to import a project?
Answer
- Open the editor settings with Ctrl+, on Windows and Linux, or Cmd+, on macOS.
- Navigate to the extension settings:
- In VS Code: Settings | Extensions | Java and Kotlin by IntelliJ IDEA
- In Cursor: VS Code Settings | Extensions | Java and Kotlin by IntelliJ IDEA
- Find the IntelliJ: Build Tool setting (
intellij.buildTool). - Set the value:
-
gradle,maven,bazel,jps, orjsonimports the project with that build tool. -
nulldetects the build tool automatically. -
""(an empty string) disables project import.
-
- The notification
Java and Kotlin by IntelliJ IDEA: settings changed. Restart Language Server to apply the changes.appears. Click Restart Language Server. - Open the Output view.
- Select the Java and Kotlin by IntelliJ IDEA -- Build channel. The channel shows the log of the new import.
The same setting in settings.json:
"intellij.buildTool": "gradle"
To import several projects in one workspace, see Project import. The same page describes how to choose between detected build systems from the status bar.
Comments
0 comments
Please sign in to leave a comment.