Gradle Kotlin CompanionA VS Code extension that brings a JetBrains-style Gradle / Kotlin-DSL
experience to Visual Studio Code, on top of (and complementing) the
official HighlightsModules & tasks
Build script integration
Version catalog (
|
| Tool reference | Purpose |
|---|---|
#gradle (gradle_run) |
Run any task with optional args. |
#gradleTasks (gradle_tasks) |
Bulleted list of tasks under a project path. |
#gradleDependencies (gradle_dependencies) |
Dependency tree for a project path. |
#libsCatalog (libs_catalog_read) |
Parsed libs.versions.toml as JSON. |
An init script (resources/gradle-kotlin.init.gradle.kts) is injected
via -I for every invocation; disable with
gradleKotlin.initScript.enabled = false or point to your own with
gradleKotlin.initScriptPath.
Sample project
sample/ contains a multi-module Kotlin/Gradle project (:app,
:core, :modules:featureA, :modules:featureB) wired up with a
gradle/libs.versions.toml version catalog. Open the sample/ folder
to see the sidebar, code lenses, inlay hints and Test Explorer in
action.
Commands
| Command | Default location |
|---|---|
Gradle: Refresh Modules |
View title $(refresh) |
Gradle: Reload Project |
View title + editor title |
Gradle: Run Task |
Tree item inline $(play) |
Gradle: Run Task with Arguments… |
Tree item inline $(edit) |
Gradle: Run Tests in Task… |
Tree item inline $(beaker) |
Gradle: Re-run Recent |
Recent-runs item $(debug-rerun) |
Gradle: Clear Recent Runs |
View title $(trash) |
Gradle: Show Dependencies |
CodeLens above dependencies { } |
Gradle: Add Subproject… |
CodeAction in settings.gradle(.kts) |
Gradle: Open Module Build File |
Module item context |
Gradle: Stop Daemon |
Status-bar click |
Configuration
| Setting | Default | Description |
|---|---|---|
gradleKotlin.gradleCommand |
empty | Override the Gradle command. |
gradleKotlin.versionInlayHints.enabled |
true |
Show ghost-text versions next to libs.*. |
gradleKotlin.versionInlayHints.checkLatest |
true |
Query Maven Central and surface current -> latest. |
gradleKotlin.codeLens.enabled |
true |
Show top-of-file Reload / Dependencies lenses. |
gradleKotlin.daemon.enabled |
true |
Keep a long-lived Gradle daemon for Copilot tool calls. |
gradleKotlin.initScript.enabled |
true |
Inject an init script via -I for every daemon invocation. |
gradleKotlin.initScriptPath |
empty | Override the init script path; defaults to the bundled one. |
Development
bun install
bun run compile
bun run test # vitest unit tests with stubbed `vscode`
bun run test:e2e # @vscode/test-electron smoke test (downloads VS Code)
To regenerate icons from the JetBrains expui set:
bun run icon
License
MIT.