DEV Community

Raphaël T
Raphaël T

Posted on

Programming with Kotlin on Visual Studio Code or Codium

(Mainly) for Windows user:

Download JDK

Download Gradle

if your not using scoop make sure you have set gradle as the system environnement variable on your current system.

Via Scoop package manager.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression

scoop bucket add main
scoop install main/gradle
Enter fullscreen mode Exit fullscreen mode

Check JDK uniqueness

java --version and gradle -version

(Important) - Make sur it's using the same JAVA_HOME.

Download LSP

  • Download https://github.com/Kotlin/kotlin-lsp/releases/
  • Open your editor
  • Drag and Drog the LSP that you download on the extension panel.
  • Go to settings > extension > kotlin by jetbrain, and set the JAVA_HOME PATH to JDK label.
  • Open terminal type gradle init --type kotlin-application, and wait for the load of the LSP extension.

Run the application

gradle && 
gradle build &&
gradle run 
Enter fullscreen mode Exit fullscreen mode

Top comments (0)