Gradle DSL Assistant

Gradle DSL Assistant adds context-aware completions to Groovy and Kotlin Gradle
build scripts (build.gradle and build.gradle.kts), plus automatic
dependency suggestions from Maven Central.
It complements rather than replaces existing Groovy and Kotlin language
extensions: it does not register either language or start another language
server.
Repository: github.com/Houssam-OUATMANI/gradle-dsl-assistant
Gradle DSL features
- Context-aware completion for the common Gradle project, settings, plugin,
repository, dependency, configuration, Java, application, publishing,
testing, source-set and task blocks in Groovy and Kotlin DSL.
- Project methods and properties, plugin declarations, dependency helpers,
repository declarations, toolchains, publications, test suites and wrapper
configuration.
- Task container APIs and project task names, plus common task actions and
type-specific APIs for
Copy, Sync, Jar, Test, JavaCompile, Exec
and Delete.
- Project-specific task names, dependency configurations and declared
dependencies, applied extension names and existing task types from the
evaluated Gradle project model.
- Context detection ignores braces in ordinary quoted strings and comments.
- Maven Central artifact search while entering a dependency coordinate, for
example
implementation 'org.springframework.boot:spring-boot'.
- Common Maven group IDs are suggested for short prefixes such as
org.; after
choosing a group, type : and an artifact prefix to narrow the search.
- Maven Central search starts automatically after a short pause once at least
two artifact-prefix characters have been entered; no Ctrl+Space is needed.
Group-only prefixes use local suggestions and do not make broad network
requests.
Maven Central search uses its public HTTPS search API; it is free and requires
no API key. An internet connection is required. Results show the latest version
as information, but insert group:artifact without a version so Gradle version
catalogs, platforms and BOMs can continue to manage versions. Disable
gradleDslAssistant.mavenSearch to turn off remote searches.
Requirements and safety
Use existing Groovy and Kotlin language extensions for syntax highlighting,
diagnostics, hover and navigation. This extension contributes Gradle DSL
completion for .gradle and .gradle.kts files.
Gradle plugins can add arbitrary project-specific DSL blocks and task types.
The extension completes the Gradle core DSL and the project model it can
discover; plugin-specific APIs not represented by that model are not guaranteed
to have completions. This is a completion provider, not a replacement for
Gradle's Kotlin/Groovy compilers or a full language server, so it does not
currently provide comprehensive diagnostics, refactoring or semantic
navigation.
The project model is refreshed using help through the Gradle Wrapper when
available, otherwise through Gradle on PATH. Gradle evaluates build scripts
while doing this, so model discovery runs only in trusted workspaces. Disable
gradleDslAssistant.autoSync to opt out, or run Gradle DSL Assistant:
Refresh Gradle Project Model manually. The Gradle DSL Assistant output
channel reports model and Maven search errors.
Development
npm install
npm test
npm run package
The packaged VS Code extension is written to
gradle-dsl-assistant-0.1.0.vsix.