cocoapods-xcremotecache 0.0.3 → 0.0.4

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: cec0659df232b506d6211509e65fa1bcdc1c405df1392fba1d846f9d90fe816e
4
- data.tar.gz: ee6f1445269a3c929015ef1be4666133dc8a3b87921a40961759d4ff4a20937b
3
+ metadata.gz: b58e25578f13afa21cbe4320803261ddd4bb144480d555563bfd26cd2f409347
4
+ data.tar.gz: 3c7c2bcd2bf9134f3473aac6c28e065f3f2de64c8c2c30ac2a368b817f8d7cad
5
5
  SHA512:
6
- metadata.gz: db2b76a94e7dbf545baeb4ac6f581e08a19488a51ed14a23d24a9429938d7052f759f0c1daada0db553691bdaa352ec8b63ace617f66abda238b031d389efae2
7
- data.tar.gz: d5b9b7bb4bed7da81069522198ca6000754bc056b27bcd756034f67aa46c82bc231bae2ecb40820a63ce455b291973bce74ed97982cf8f92f84dc6af3ea57519
6
+ metadata.gz: 50a2ca5de999de57e11147b6511599fe2c5413fd45747eb15571bedda6aed45570cdb0d07815de9f2ac572146268f6918c4a04382386aa6c2f4c60ca6f881523
7
+ data.tar.gz: e1f2fdb634554efa408032bcff276a17c8a0ae21b9f3fd285424abe689764cec62e25480e91828b5adde2ada934227e005b30e3d8c85432a331d5642dabf57d7
data/README.md CHANGED
@@ -52,6 +52,7 @@ An object that is passed to the `xcremotecache` can contain all properties suppo
52
52
  | `modify_lldb_init` | Controls if the pod integration should modify `~/.lldbinit` | `true` | ⬜️ |
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
+ | `prettify_meta_files` | A Boolean value that opts-in pretty JSON formatting for meta files | `false` | ⬜️ |
55
56
 
56
57
  ## Uninstalling
57
58
 
@@ -17,6 +17,7 @@ require 'cocoapods/resolver'
17
17
  require 'open-uri'
18
18
  require 'yaml'
19
19
  require 'json'
20
+ require 'pathname'
20
21
 
21
22
 
22
23
  module CocoapodsXCRemoteCacheModifier
@@ -58,6 +59,7 @@ module CocoapodsXCRemoteCacheModifier
58
59
  'xccc_file' => "#{BIN_DIR}/xccc",
59
60
  'remote_commit_file' => "#{BIN_DIR}/arc.rc",
60
61
  'exclude_targets' => [],
62
+ 'prettify_meta_files' => false
61
63
  }
62
64
  @@configuration.merge! default_values.select { |k, v| !@@configuration.key?(k) }
63
65
  end
@@ -114,6 +116,7 @@ module CocoapodsXCRemoteCacheModifier
114
116
  config.build_settings['LD'] = ["$SRCROOT/#{srcroot_relative_xc_location}/xcld"]
115
117
 
116
118
  config.build_settings['XCREMOTE_CACHE_FAKE_SRCROOT'] = FAKE_SRCROOT
119
+ config.build_settings['XCRC_PLATFORM_PREFERRED_ARCH'] = ["$(LINK_FILE_LIST_$(CURRENT_VARIANT)_$(PLATFORM_PREFERRED_ARCH):dir:standardizepath:file:default=arm64)"]
117
120
  debug_prefix_map_replacement = '$(SRCROOT' + ':dir:standardizepath' * repo_distance + ')'
118
121
  add_cflags!(config.build_settings, '-fdebug-prefix-map', "#{debug_prefix_map_replacement}=$(XCREMOTE_CACHE_FAKE_SRCROOT)")
119
122
  add_swiftflags!(config.build_settings, '-debug-prefix-map', "#{debug_prefix_map_replacement}=$(XCREMOTE_CACHE_FAKE_SRCROOT)")
@@ -156,8 +159,8 @@ module CocoapodsXCRemoteCacheModifier
156
159
  postbuild_script.shell_script = "\"$SCRIPT_INPUT_FILE_0\""
157
160
  postbuild_script.input_paths = ["$SRCROOT/#{srcroot_relative_xc_location}/xcpostbuild"]
158
161
  postbuild_script.output_paths = [
159
- "$(TARGET_BUILD_DIR)/$(MODULES_FOLDER_PATH)/$(PRODUCT_MODULE_NAME).swiftmodule/$(PLATFORM_PREFERRED_ARCH).swiftmodule.md5",
160
- "$(TARGET_BUILD_DIR)/$(MODULES_FOLDER_PATH)/$(PRODUCT_MODULE_NAME).swiftmodule/$(PLATFORM_PREFERRED_ARCH)-$(LLVM_TARGET_TRIPLE_VENDOR)-$(SWIFT_PLATFORM_TARGET_PREFIX)$(LLVM_TARGET_TRIPLE_SUFFIX).swiftmodule.md5"
162
+ "$(TARGET_BUILD_DIR)/$(MODULES_FOLDER_PATH)/$(PRODUCT_MODULE_NAME).swiftmodule/$(XCRC_PLATFORM_PREFERRED_ARCH).swiftmodule.md5",
163
+ "$(TARGET_BUILD_DIR)/$(MODULES_FOLDER_PATH)/$(PRODUCT_MODULE_NAME).swiftmodule/$(XCRC_PLATFORM_PREFERRED_ARCH)-$(LLVM_TARGET_TRIPLE_VENDOR)-$(SWIFT_PLATFORM_TARGET_PREFIX)$(LLVM_TARGET_TRIPLE_SUFFIX).swiftmodule.md5"
161
164
  ]
162
165
  postbuild_script.dependency_file = "$(TARGET_TEMP_DIR)/postbuild.d"
163
166
 
@@ -353,7 +356,8 @@ module CocoapodsXCRemoteCacheModifier
353
356
  download_xcrc_if_needed(xcrc_location_absolute)
354
357
 
355
358
  # Save .rcinfo
356
- save_rcinfo(generate_rcinfo(), user_proj_directory)
359
+ root_rcinfo = generate_rcinfo()
360
+ save_rcinfo(root_rcinfo, user_proj_directory)
357
361
 
358
362
  # Create directory for xccc & arc.rc location
359
363
  Dir.mkdir(BIN_DIR) unless File.exist?(BIN_DIR)
@@ -378,8 +382,18 @@ module CocoapodsXCRemoteCacheModifier
378
382
  # Create .rcinfo into `Pods` directory as that .xcodeproj reads configuration from .xcodeproj location
379
383
  pods_proj_directory = installer_context.sandbox_root
380
384
 
381
- # Manual .rcinfo generation (in YAML format)
382
- save_rcinfo({'extra_configuration_file' => "#{user_proj_directory}/.rcinfo"}, pods_proj_directory)
385
+ # Manual Pods/.rcinfo generation
386
+
387
+ # all paths in .rcinfo are relative to the root so paths used in Pods.xcodeproj need to be aligned
388
+ pods_path = Pathname.new(pods_proj_directory)
389
+ root_path = Pathname.new(user_proj_directory)
390
+ root_path_to_pods = root_path.relative_path_from(pods_path)
391
+
392
+ pods_rcinfo = root_rcinfo.merge({
393
+ 'remote_commit_file' => "#{root_path_to_pods}/#{remote_commit_file}",
394
+ 'xccc_file' => "#{root_path_to_pods}/#{xccc_location}"
395
+ })
396
+ save_rcinfo(pods_rcinfo, pods_proj_directory)
383
397
 
384
398
  installer_context.pods_project.save()
385
399
  end
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  module CocoapodsXcremotecache
16
- VERSION = "0.0.3"
16
+ VERSION = "0.0.4"
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.3
4
+ version: 0.0.4
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: 2021-12-05 00:00:00.000000000 Z
12
+ date: 2022-01-06 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: CocoaPods plugin that enables XCRemoteCache with the project.
15
15
  email: