bibliothecary 8.3.9 → 8.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bibliothecary/parsers/maven.rb +22 -1
- data/lib/bibliothecary/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 65f4910198d30819544a51adff24b14ce2214631dc0adf958d264dd89800f1ab
|
|
4
|
+
data.tar.gz: 362bea1f8f48122e28253491c281e2a25bdf6d14c831e988435da4bc02b3da52
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 51e6c14e963753db57341b241356a323dcc55e31b9593444aca6d2cc5882af26fe52d06b36b1382f11367f301bd817f82a35ab7ff8dd5d7d1e065ec52775e06f
|
|
7
|
+
data.tar.gz: bdfcc8fbb046095031c39619955eef933bfe4a59e7d59558e621e7bd6ab391fda2559b10a85640abf181505dfce0bd21ec7103325595a2dfa0cbeb2da828e437
|
|
@@ -12,6 +12,11 @@ module Bibliothecary
|
|
|
12
12
|
# "| \\--- com.google.guava:guava:23.5-jre (*)"
|
|
13
13
|
GRADLE_DEP_REGEX = /(\+---|\\---){1}/
|
|
14
14
|
|
|
15
|
+
# Dependencies that are on-disk projects, eg:
|
|
16
|
+
# \--- project :api:my-internal-project
|
|
17
|
+
# +--- my-group:my-alias:1.2.3 -> project :client (*)
|
|
18
|
+
GRADLE_PROJECT_REGEX = /project :(\S+)/
|
|
19
|
+
|
|
15
20
|
# Builtin methods: https://docs.gradle.org/current/userguide/java_plugin.html#tab:configurations
|
|
16
21
|
# Deprecated methods: https://docs.gradle.org/current/userguide/upgrading_version_6.html#sec:configuration_removal
|
|
17
22
|
GRADLE_DEPENDENCY_METHODS = %w(api compile compileClasspath compileOnly compileOnlyApi implementation runtime runtimeClasspath runtimeOnly testCompile testCompileOnly testImplementation testRuntime testRuntimeOnly)
|
|
@@ -148,11 +153,27 @@ module Bibliothecary
|
|
|
148
153
|
|
|
149
154
|
split = gradle_dep_match.captures[0]
|
|
150
155
|
|
|
156
|
+
# gradle can import on-disk projects and deps will be listed under them, e.g. `+--- project :pie2-testing`,
|
|
157
|
+
# so we treat these projects as internal deps themselves (["internal:foo","0.0.0"])
|
|
158
|
+
if (project_match = line.match(GRADLE_PROJECT_REGEX))
|
|
159
|
+
project_name = project_match[1]
|
|
160
|
+
line = line.sub(GRADLE_PROJECT_REGEX, "__PROJECT_GROUP__:__PROJECT_NAME__:__PROJECT_REQUIREMENT__") # project names can have colons, which breaks our split(":") below, so sub it out until after we've parsed the line.
|
|
161
|
+
else
|
|
162
|
+
project_name = ""
|
|
163
|
+
end
|
|
164
|
+
|
|
151
165
|
dep = line
|
|
152
166
|
.split(split)[1].sub(/(\((c|n|\*)\))$/, "") # line ending legend: (c) means a dependency constraint, (n) means not resolved, or (*) means resolved previously, e.g. org.springframework.boot:spring-boot-starter-web:2.1.0.M3 (*)
|
|
153
167
|
.sub(/ FAILED$/, "") # dependency could not be resolved (but still may have a version)
|
|
154
168
|
.sub(" -> ", ":") # handle version arrow syntax
|
|
155
|
-
.strip
|
|
169
|
+
.strip
|
|
170
|
+
.split(":")
|
|
171
|
+
.map do |part|
|
|
172
|
+
part
|
|
173
|
+
.sub(/__PROJECT_GROUP__/, "internal")# give all projects a group namespace of "internal"
|
|
174
|
+
.sub(/__PROJECT_NAME__/, project_name)
|
|
175
|
+
.sub(/__PROJECT_REQUIREMENT__/, "1.0.0") # give all projects a requirement of "1.0.0".
|
|
176
|
+
end # replace placeholders after we've parsed the line
|
|
156
177
|
|
|
157
178
|
# A testImplementation line can look like this so just skip those
|
|
158
179
|
# \--- org.springframework.security:spring-security-test (n)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bibliothecary
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.
|
|
4
|
+
version: 8.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Nesbitt
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-08-
|
|
11
|
+
date: 2022-08-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: tomlrb
|