Skip to content

Commit

Permalink
Fix issue with gradle dep parsing (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Ellis authored Oct 22, 2020
1 parent cdd7644 commit fc7b9a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/bibliothecary/parsers/maven.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ def self.parse_gradle_resolved(file_contents)
split = gradle_dep_match.captures[0]

# org.springframework.boot:spring-boot-starter-web:2.1.0.M3 (*)
# Lines can end with (n) or (*) to indicate that something was not resolved (n) or resolved previously (*).
dep = line.split(split)[1].sub(/\(n\)$/, "").sub(/\(\*\)$/,"").strip.split(":")
# Lines can end with (c), (n), or (*)
# to indicate that something was a dependency constraint (c), not resolved (n), or resolved previously (*).
dep = line.split(split)[1].sub(/(\((c|n|\*)\))$/, "").strip.split(":")
version = dep[-1]
version = version.split("->")[-1].strip if line.include?("->")
{
Expand Down

0 comments on commit fc7b9a9

Please # to comment.