Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added
- **Gradle ecosystem support** — New `deps-gradle` crate with support for three manifest formats
- Version Catalog parser (`gradle/libs.versions.toml`) via toml_edit with position tracking
- Version Catalog parser (`gradle/libs.versions.toml`) via toml-span with reliable span tracking
- Kotlin DSL parser (`build.gradle.kts`) via regex
- Groovy DSL parser (`build.gradle`) via regex
- Reuses `MavenCentralRegistry` from deps-maven (no registry duplication)
- Parses `[versions]`, `[libraries]` sections with `version.ref` resolution
- Recognizes all Gradle configurations: implementation, api, compileOnly, runtimeOnly, testImplementation, etc.
- Feature-gated registration in deps-lsp (`gradle`)
- **Google Maven repository support** — Android packages (`androidx.*`, `com.google.firebase.*`, `com.google.android.*`, `com.android.*`) now resolve from Google Maven instead of Maven Central

### Changed
- Extract `LineOffsetTable` and `position_in_range` to deps-core for reuse across ecosystems
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ thiserror = "2"
tokio = "1.49"
tokio-test = "0.4"
toml_edit = "0.25"
toml-span = "0.7"
tower-lsp-server = "0.23"
tracing = "0.1"
tracing-subscriber = "0.3"
Expand Down
15 changes: 0 additions & 15 deletions crates/deps-core/src/lsp_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,6 @@ impl LineOffsetTable {
Self { line_starts }
}

/// Returns the byte offset of the start of the given 0-based line.
pub fn line_start_offset(&self, line: u32) -> usize {
self.line_starts.get(line as usize).copied().unwrap_or(0)
}

/// Returns the byte offset of the end of the given 0-based line (before newline).
pub fn line_end_offset(&self, content: &str, line: u32) -> usize {
let next_line = line as usize + 1;
if next_line < self.line_starts.len() {
self.line_starts[next_line].saturating_sub(1)
} else {
content.len()
}
}

/// Converts a byte offset into an LSP `Position`.
pub fn byte_offset_to_position(&self, content: &str, offset: usize) -> Position {
let offset = offset.min(content.len());
Expand Down
2 changes: 1 addition & 1 deletion crates/deps-gradle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async-trait = { workspace = true }
regex = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
toml_edit = { workspace = true }
toml-span = { workspace = true }
tower-lsp-server = { workspace = true }
tracing = { workspace = true }

Expand Down
Loading
Loading