cocoapods-xcremotecache 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c55188d92fcdf04e74187bd4c61dc05759f4b88a4a14709c855fe8f4f6edd285
4
- data.tar.gz: f30d155a01be304acd6630a8c976dac97aab670fd4fcab25b3c43294f622a91c
3
+ metadata.gz: 1fc87268b74a697a6b70fb9ec6b33d4c39791b859853ed7b259bd8b1a7863da3
4
+ data.tar.gz: 178209c802e125dc34ae391aae672b4ff23b704cc3ac024817ce3fcefb6b33de
5
5
  SHA512:
6
- metadata.gz: b1f4d863ffcff4fbb60a547d0ec86e8f1152441d13e046539cc8c773a8d29da7a1beb49324c842c41e4c1d74639d3a6ced669eda3733cb4f989c3ce4b678cebd
7
- data.tar.gz: 7abad465202e061fd629b53237dfd2aa6584c57481f2f00a76441f67c99ea495523e886b629cc3170233412893b8a35728660d1971023ebc645cf71397384927
6
+ metadata.gz: 57f5a7b4136879cee987bfce46a920b0ea25296e8684d931fae2702f5e37c5d0f00ae81155c271008eaa58e14dad1bdb03316ed3945697e3a2388aafeb79b8bc
7
+ data.tar.gz: 6da51ede43ab92f20fb85b108135549e4e1e98d0934f0c3993a9c8f3f653fb337a5569e9b7435815cf49917e2b05ad64ebdef6352d2713cc882d8344d906c046
data/README.md CHANGED
@@ -53,6 +53,7 @@ An object that is passed to the `xcremotecache` can contain all properties suppo
53
53
  | `xccc_file` | The path where should be placed the `xccc` binary (in the pod installation phase) | `{podfile_dir}/.rc/xccc` | ⬜️ |
54
54
  | `remote_commit_file` | The path of the file with the remote commit sha (in the pod installation phase) | `{podfile_dir}/.rc/arc.rc`| ⬜️ |
55
55
  | `prettify_meta_files` | A Boolean value that opts-in pretty JSON formatting for meta files | `false` | ⬜️ |
56
+ | `fake_src_root` | An arbitrary source location shared between producers and consumers. Should be unique for a project. | `/xxxxxxxxxx` | ⬜️ |
56
57
  | `disable_certificate_verification` | A Boolean value that opts-in SSL certificate validation is disabled | `false` | ⬜️ |
57
58
 
58
59
  ## Uninstalling
@@ -24,7 +24,6 @@ module CocoapodsXCRemoteCacheModifier
24
24
  # Registers for CocoaPods plugin hooks
25
25
  module Hooks
26
26
  BIN_DIR = '.rc'
27
- FAKE_SRCROOT = "/#{'x' * 10 }"
28
27
  LLDB_INIT_COMMENT="#RemoteCacheCustomSourceMap"
29
28
  LLDB_INIT_PATH = "#{ENV['HOME']}/.lldbinit"
30
29
  FAT_ARCHIVE_NAME_INFIX = 'arm64-x86_64'
@@ -40,6 +39,7 @@ module CocoapodsXCRemoteCacheModifier
40
39
  'check_platform',
41
40
  'modify_lldb_init',
42
41
  'prettify_meta_files',
42
+ 'fake_src_root',
43
43
  'disable_certificate_verification'
44
44
  ]
45
45
 
@@ -63,6 +63,7 @@ module CocoapodsXCRemoteCacheModifier
63
63
  'remote_commit_file' => "#{BIN_DIR}/arc.rc",
64
64
  'exclude_targets' => [],
65
65
  'prettify_meta_files' => false,
66
+ 'fake_src_root' => "/#{'x' * 10 }",
66
67
  'disable_certificate_verification' => false
67
68
  }
68
69
  @@configuration.merge! default_values.select { |k, v| !@@configuration.key?(k) }
@@ -106,7 +107,7 @@ module CocoapodsXCRemoteCacheModifier
106
107
  # @param mode [String] mode name ('consumer', 'producer', 'producer-fast' etc.)
107
108
  # @param exclude_build_configurations [String[]] list of targets that should have disabled remote cache
108
109
  # @param final_target [String] name of target that should trigger marking
109
- def self.enable_xcremotecache(target, repo_distance, xc_location, xc_cc_path, mode, exclude_build_configurations, final_target)
110
+ def self.enable_xcremotecache(target, repo_distance, xc_location, xc_cc_path, mode, exclude_build_configurations, final_target, fake_src_root)
110
111
  srcroot_relative_xc_location = parent_dir(xc_location, repo_distance)
111
112
 
112
113
  target.build_configurations.each do |config|
@@ -121,7 +122,7 @@ module CocoapodsXCRemoteCacheModifier
121
122
  config.build_settings['LIBTOOL'] = ["$SRCROOT/#{srcroot_relative_xc_location}/xclibtool"]
122
123
  config.build_settings['LD'] = ["$SRCROOT/#{srcroot_relative_xc_location}/xcld"]
123
124
 
124
- config.build_settings['XCREMOTE_CACHE_FAKE_SRCROOT'] = FAKE_SRCROOT
125
+ config.build_settings['XCREMOTE_CACHE_FAKE_SRCROOT'] = fake_src_root
125
126
  config.build_settings['XCRC_PLATFORM_PREFERRED_ARCH'] = ["$(LINK_FILE_LIST_$(CURRENT_VARIANT)_$(PLATFORM_PREFERRED_ARCH):dir:standardizepath:file:default=arm64)"]
126
127
  debug_prefix_map_replacement = '$(SRCROOT' + ':dir:standardizepath' * repo_distance + ')'
127
128
  add_cflags!(config.build_settings, '-fdebug-prefix-map', "#{debug_prefix_map_replacement}=$(XCREMOTE_CACHE_FAKE_SRCROOT)")
@@ -330,17 +331,17 @@ module CocoapodsXCRemoteCacheModifier
330
331
  end
331
332
 
332
333
  # Append source rewrite command to the lldbinit content
333
- def self.add_lldbinit_rewrite(lines_content, user_proj_directory)
334
+ def self.add_lldbinit_rewrite(lines_content, user_proj_directory,fake_src_root)
334
335
  all_lines = lines_content.clone
335
336
  all_lines << LLDB_INIT_COMMENT
336
- all_lines << "settings set target.source-map #{FAKE_SRCROOT} #{user_proj_directory}"
337
+ all_lines << "settings set target.source-map #{fake_src_root} #{user_proj_directory}"
337
338
  all_lines << ""
338
339
  all_lines
339
340
  end
340
341
 
341
- def self.save_lldbinit_rewrite(user_proj_directory)
342
+ def self.save_lldbinit_rewrite(user_proj_directory,fake_src_root)
342
343
  lldbinit_lines = clean_lldbinit_content(LLDB_INIT_PATH)
343
- lldbinit_lines = add_lldbinit_rewrite(lldbinit_lines, user_proj_directory) unless user_proj_directory.nil?
344
+ lldbinit_lines = add_lldbinit_rewrite(lldbinit_lines, user_proj_directory,fake_src_root) unless user_proj_directory.nil?
344
345
  File.write(LLDB_INIT_PATH, lldbinit_lines.join("\n"), mode: "w")
345
346
  end
346
347
 
@@ -372,6 +373,7 @@ module CocoapodsXCRemoteCacheModifier
372
373
  final_target = @@configuration['final_target']
373
374
  check_build_configuration = @@configuration['check_build_configuration']
374
375
  check_platform = @@configuration['check_platform']
376
+ fake_src_root = @@configuration['fake_src_root']
375
377
 
376
378
  xccc_location_absolute = "#{user_proj_directory}/#{xccc_location}"
377
379
  xcrc_location_absolute = "#{user_proj_directory}/#{xcrc_location}"
@@ -403,7 +405,7 @@ module CocoapodsXCRemoteCacheModifier
403
405
  next if target.name.start_with?("Pods-")
404
406
  next if target.name.end_with?("Tests")
405
407
  next if exclude_targets.include?(target.name)
406
- enable_xcremotecache(target, 1, xcrc_location, xccc_location, mode, exclude_build_configurations, final_target)
408
+ enable_xcremotecache(target, 1, xcrc_location, xccc_location, mode, exclude_build_configurations, final_target,fake_src_root)
407
409
  end
408
410
 
409
411
  # Create .rcinfo into `Pods` directory as that .xcodeproj reads configuration from .xcodeproj location
@@ -416,7 +418,7 @@ module CocoapodsXCRemoteCacheModifier
416
418
  next if target.source_build_phase.files_references.empty?
417
419
  next if target.name.end_with?("Tests")
418
420
  next if exclude_targets.include?(target.name)
419
- enable_xcremotecache(target, 1, xcrc_location, xccc_location, mode, exclude_build_configurations, final_target)
421
+ enable_xcremotecache(target, 1, xcrc_location, xccc_location, mode, exclude_build_configurations, final_target,fake_src_root)
420
422
  end
421
423
  generated_project.save()
422
424
  end
@@ -456,15 +458,15 @@ module CocoapodsXCRemoteCacheModifier
456
458
  # Attach XCRC to the app targets
457
459
  user_project.targets.each do |target|
458
460
  next if exclude_targets.include?(target.name)
459
- enable_xcremotecache(target, 0, xcrc_location, xccc_location, mode, exclude_build_configurations, final_target)
461
+ enable_xcremotecache(target, 0, xcrc_location, xccc_location, mode, exclude_build_configurations, final_target,fake_src_root)
460
462
  end
461
463
 
462
464
  # Set Target sourcemap
463
465
  if @@configuration['modify_lldb_init']
464
- save_lldbinit_rewrite(user_proj_directory)
466
+ save_lldbinit_rewrite(user_proj_directory,fake_src_root)
465
467
  else
466
468
  Pod::UI.puts "[XCRC] lldbinit modification is disabled. Debugging may behave weirdly"
467
- Pod::UI.puts "[XCRC] put \"settings set target.source-map #{FAKE_SRCROOT} \#{your_project_directory}\" to your \".lldbinit\" "
469
+ Pod::UI.puts "[XCRC] put \"settings set target.source-map #{fake_src_root} \#{your_project_directory}\" to your \".lldbinit\" "
468
470
  end
469
471
 
470
472
  user_project.save()
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  module CocoapodsXcremotecache
16
- VERSION = "0.0.9"
16
+ VERSION = "0.0.10"
17
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-xcremotecache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bartosz Polaczyk
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-04-12 00:00:00.000000000 Z
12
+ date: 2022-05-11 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: CocoaPods plugin that enables XCRemoteCache with the project.
15
15
  email: