dependabot-gradle 0.384.0 → 0.385.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60a4e8bbe348c7bb7cbd6fbc275892a16a54bed033bd2668c483b1c8e905ad20
4
- data.tar.gz: 268f0b46c9fce142acc4f4b615803481e6e9a72844aafcaee0b18becccd471ef
3
+ metadata.gz: b33a1aadd94d7a204f604651aceeba5486fd6cc60c2819a6c1682cb1e5076458
4
+ data.tar.gz: aa1551e8c761d7d3b720a6a58e8e1e1831f008ceb0390ceece8cc082690ead8d
5
5
  SHA512:
6
- metadata.gz: '0093b562d15794bddca25d32a49a016c7728f2275c7c4e1b206c95ed570e2c4cb2f89b27e508f533371241d51d03bda0d58a47c9ea8939bf7fa47d857636d0cb'
7
- data.tar.gz: 06c419e20a01912105e76ec70577a27ab9fc091b37493b7d2481ae7e3383fc1d971004b6561b573f45db9bb0d54cfaafa35588e38b5e1aafd8f5c50cbc31f563
6
+ metadata.gz: 62324f5138718c95e6bb1f7635a15cb999778400e01a4dc3f9ca6b86363abe387487ee22af7924987a25e77ca5b913527eea08a9b1bacec16756332a65a6b5fb
7
+ data.tar.gz: c3bb6f063ceb40e7f05cb9381957b07ab1687121a4bf2739297d855ec721152b7d6418a9d80e9e8fe4271a768082fb9dfce5711fad11e6a82a28544d05753d8d
@@ -81,7 +81,8 @@ module Dependabot
81
81
 
82
82
  sig { params(root_dir: String).returns(T::Array[DependencyFile]) }
83
83
  def all_buildfiles_in_build(root_dir)
84
- files = [buildfile(root_dir), settings_file(root_dir), version_catalog_file(root_dir), lockfile(root_dir)]
84
+ files = [buildfile(root_dir), settings_file(root_dir), version_catalog_file(root_dir), lockfile(root_dir),
85
+ properties_file(root_dir)]
85
86
  .compact
86
87
  files += wrapper_files(root_dir)
87
88
  files += subproject_buildfiles(root_dir)
@@ -251,6 +252,11 @@ module Dependabot
251
252
  fetch_file_if_present(File.join(dir, @lockfile_name))
252
253
  end
253
254
 
255
+ sig { params(dir: String).returns(T.nilable(DependencyFile)) }
256
+ def properties_file(dir)
257
+ fetch_file_if_present(File.join(dir, "gradle.properties"))
258
+ end
259
+
254
260
  sig { params(dir: String).returns(T.nilable(DependencyFile)) }
255
261
  def buildfile(dir)
256
262
  file = find_first(dir, SUPPORTED_BUILD_FILE_NAMES) || return
@@ -191,12 +191,16 @@ module Dependabot
191
191
  http_proxy_port = http_split&.fetch(2) || "1080"
192
192
  https_proxy_port = https_split&.fetch(2) || "1080"
193
193
 
194
- properties_content = "
194
+ existing_content = File.exist?(file_name) ? File.read(file_name) : ""
195
+
196
+ proxy_properties = "
195
197
  systemProp.http.proxyHost=#{http_proxy_host}
196
198
  systemProp.http.proxyPort=#{http_proxy_port}
197
199
  systemProp.https.proxyHost=#{https_proxy_host}
198
200
  systemProp.https.proxyPort=#{https_proxy_port}"
199
- File.write(file_name, properties_content)
201
+
202
+ separator = !existing_content.empty? && !existing_content.end_with?("\n") ? "\n" : ""
203
+ File.write(file_name, existing_content + separator + proxy_properties)
200
204
  end
201
205
 
202
206
  sig { params(file_name: String).void }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-gradle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.384.0
4
+ version: 0.385.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
@@ -15,28 +15,28 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 0.384.0
18
+ version: 0.385.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 0.384.0
25
+ version: 0.385.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: dependabot-maven
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - '='
31
31
  - !ruby/object:Gem::Version
32
- version: 0.384.0
32
+ version: 0.385.0
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - '='
38
38
  - !ruby/object:Gem::Version
39
- version: 0.384.0
39
+ version: 0.385.0
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: debug
42
42
  requirement: !ruby/object:Gem::Requirement
@@ -291,7 +291,7 @@ licenses:
291
291
  - MIT
292
292
  metadata:
293
293
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
294
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.384.0
294
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.385.0
295
295
  rdoc_options: []
296
296
  require_paths:
297
297
  - lib