cocoapods-binary-artifactory-cache 0.0.2 → 0.0.6

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: f4de1125d0101423f9584e1d7b943bb7608707d184d17969e6b4fad8d19f7ed2
4
- data.tar.gz: aa9eb1829465d0968994e50d1ce7152e26e2c738fa12fc0bfc73330a8faad649
3
+ metadata.gz: b4cfc2fff39aee0f9265546c438f2aa6126ef39bfa1f1f0efe79306a8d62246a
4
+ data.tar.gz: 4b3da62440e42f152100015119aa58f0298f359783ad909a4c754ef1380c84ff
5
5
  SHA512:
6
- metadata.gz: bc15343f0371dd62c865ab8196e262f21b16b8d1224d6334451f42717fd99c492dbadb743d9b03d499d45e64ca29e64f769303460dd889499156d9f125337141
7
- data.tar.gz: 12c4c55e05d09df5670fac9b15ac0739f2c9689226060ca969b187f78e50faa0621314bac9a6a80507e28aa040344fc45fa68d93b863e54d771dfb4046a01d1e
6
+ metadata.gz: 23da6af76fe38360a654ca34afc3041cd07f777f0d28b36b0d29c6ca1f2406bdb80ce9a3154ea0a5745c7a28bf16c2208894b98d4386c153cc3a226c465edf11
7
+ data.tar.gz: ddab146341a0502353fbcf091ae21ea102458a6df055a8812499e53e12fe73d2376b15926a2bcbd34e23dccd7972347c7a4db4826ff2e95edc350462a8c59fcf
@@ -30,6 +30,7 @@ module PodPrebuild
30
30
  collect_output(target, Dir[target_products_dir_of(target, sdks[0]) + "/*"])
31
31
  end
32
32
  end
33
+ fix_swiftinterface_files(targets)
33
34
  end
34
35
 
35
36
  private
@@ -66,7 +67,9 @@ module PodPrebuild
66
67
  args_[:simulator] ||= []
67
68
  args_[:device] ||= []
68
69
  args_[:default].prepend("BITCODE_GENERATION_MODE=bitcode") if bitcode_enabled?
70
+ args_[:default].prepend("DEBUG_INFORMATION_FORMAT=dwarf-with-dsym") unless disable_dsym?
69
71
  args_[:default].prepend("DEBUG_INFORMATION_FORMAT=dwarf") if disable_dsym?
72
+ args_[:default].prepend("BUILD_LIBRARY_FOR_DISTRIBUTION=YES")
70
73
  args_[:simulator].prepend("ARCHS=x86_64", "ONLY_ACTIVE_ARCH=NO") if simulator == "iphonesimulator"
71
74
  args_[:simulator] += args_[:default]
72
75
  args_[:device].prepend("ONLY_ACTIVE_ARCH=NO")
@@ -97,8 +100,9 @@ module PodPrebuild
97
100
  output = "#{output_path(target)}/#{target.product_module_name}.xcframework"
98
101
  FileUtils.rm_rf(output)
99
102
 
100
- cmd = ["xcodebuild", "-create-xcframework", "-allow-internal-distribution"]
101
-
103
+ cmd = ["xcodebuild", "-create-xcframework"]
104
+ # -allow-internal-distribution
105
+ #
102
106
  # for each sdk, the order of params must be -framework then -debug-symbols
103
107
  # to prevent duplicated file error when copying dSYMs
104
108
  sdks.each do |sdk|
@@ -123,6 +127,21 @@ module PodPrebuild
123
127
  `#{cmd.join(" ")}`
124
128
  end
125
129
 
130
+ def fix_swiftinterface_files(targets)
131
+ targets.each do |target|
132
+ escapedPod = target.product_module_name.gsub('/', '\/')
133
+ # replace when framework and class in framework with the same name
134
+ replaceString1 = "-e '/^import/! s/ #{escapedPod}\\./ /g'" #remove framework name in swiftinterface of it frameworkd
135
+ replaceString2 = "-e 's/\(#{escapedPod}\\./(/g'"
136
+ replaceString3 = "-e 's/\\[#{escapedPod}\\./[/g'"
137
+ replaceString4 = "-e 's/<#{escapedPod}\\./</g'"
138
+ `find "#{output_path(target)}/#{target.product_module_name}.xcframework" -name '*.swiftinterface' -exec sed -i -e #{replaceString1} #{replaceString2} #{replaceString3} #{replaceString4} {} \\\;`
139
+ end
140
+ #remove dublication name in other frameworks
141
+ replaceString = targets.map { |x| x.product_module_name }.uniq().map{ |x| x.gsub('/', '\/')}.map{|x| "-e 's/#{x}\\.#{x}/#{x}/g'"}.join(' ')
142
+ `find #{@options[:output_path]} -name '*.swiftinterface' -exec sed -i -e #{replaceString} {} \\\;`
143
+ end
144
+
126
145
  def create_fat_framework(target)
127
146
  # When merging contents of `simulator` & `device`, prefer contents of `device` over `simulator`
128
147
  # https://github.com/grab/cocoapods-binary-cache/issues/25
@@ -9,6 +9,7 @@ module PodPrebuild
9
9
 
10
10
  def initialize(options)
11
11
  super(options)
12
+ @repo_update = options[:repo_update]
12
13
  end
13
14
 
14
15
  def run
@@ -20,7 +21,7 @@ module PodPrebuild
20
21
  lockfile: installer.lockfile,
21
22
  cache_validation: nil
22
23
  )
23
-
24
+ @binary_installer.repo_update = @repo_update
24
25
  Pod::UI.title("Generate Manifest") do
25
26
  @binary_installer.clean_delta_file
26
27
  @binary_installer.install!
data/lib/command/fetch.rb CHANGED
@@ -6,6 +6,12 @@ module Pod
6
6
  class Binary < Command
7
7
  class Fetch < Binary
8
8
  self.arguments = [CLAide::Argument.new("CACHE-BRANCH", false)]
9
+ def self.options
10
+ [
11
+ ["--repo-update", "Update pod repo before installing"]
12
+ ].concat(super)
13
+ end
14
+
9
15
  def initialize(argv)
10
16
  super
11
17
  unless ENV['ARTIFACTORY_LOGIN'].nil? && ENV['ARTIFACTORY_PASSWORD'].nil?
@@ -28,6 +34,7 @@ module Pod
28
34
  )
29
35
  @fetcher = PodPrebuild::CacheFetcher.new(
30
36
  config: prebuild_config,
37
+ repo_update: argv.flag?("repo-update")
31
38
  )
32
39
  end
33
40
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-binary-artifactory-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugene Antropov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-17 00:00:00.000000000 Z
11
+ date: 2022-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  - !ruby/object:Gem::Version
200
200
  version: '0'
201
201
  requirements: []
202
- rubygems_version: 3.0.3.1
202
+ rubygems_version: 3.3.5
203
203
  signing_key:
204
204
  specification_version: 4
205
205
  summary: Reduce build time by building pod frameworks and cache it in artifactory