cocoapods-binary-artifactory-cache 0.0.3 → 0.0.7

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: 1273050331a8b3d8610e12688032d34c6f9040cb2f55f19a7cd04db82ee872be
4
- data.tar.gz: 95b1db27646e934d2cf3bbd9011f881ba886f33225ede9a03a97a00997cdcb89
3
+ metadata.gz: 36950b359fd58cf20b6961d93dbeaf5e35e2f77bd2a6c7a70becb43fde143b72
4
+ data.tar.gz: c662bf7cc890f0cf1714a6c7ebddb452f599ee949290b5f87c2a87dfd5d1ca9a
5
5
  SHA512:
6
- metadata.gz: 137a0cd00be76f55d4b8b087c1680769510b0f17cd38274bbcc6b0678f28a45edfb0140f4de0ba539b3041d806e47604ccb020cff3796d4b13e1d2f00708bd56
7
- data.tar.gz: b4292daf6c46cbf4168e9cbf58f16eaa7f3bcbab4c4235b902aad8ea105938ee23ffc74d9ffc8b6bfb515908d68c7c7fe883821167f3590ac7aa0efdf15803a4
6
+ metadata.gz: 87e0388dc105be402cfa7e14c668322874b0acd63063db6f39d7c7f2ef10621730da0b80f58ffe91133e95403678aaddad0e4695a2b05ae5e14b309413128245
7
+ data.tar.gz: eaa69f3edd8eebcce84bd92f2fda7547d7c1b3f041994f9a9a5e7fcf91fcf349e650d25622cc995b36e3f4a8c08fbb4299de7229e8bb5981959f38d707fc4881
@@ -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
@@ -99,8 +100,9 @@ module PodPrebuild
99
100
  output = "#{output_path(target)}/#{target.product_module_name}.xcframework"
100
101
  FileUtils.rm_rf(output)
101
102
 
102
- cmd = ["xcodebuild", "-create-xcframework", "-allow-internal-distribution"]
103
-
103
+ cmd = ["xcodebuild", "-create-xcframework"]
104
+ # -allow-internal-distribution
105
+ #
104
106
  # for each sdk, the order of params must be -framework then -debug-symbols
105
107
  # to prevent duplicated file error when copying dSYMs
106
108
  sdks.each do |sdk|
@@ -125,6 +127,24 @@ module PodPrebuild
125
127
  `#{cmd.join(" ")}`
126
128
  end
127
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
+ Pod::UI.puts_indented "$ find '#{output_path(target)}/#{target.product_module_name}.xcframework' -name '*.swiftinterface' -exec sed -i -e #{replaceString1} #{replaceString2} #{replaceString3} #{replaceString4} {} \\\;"
139
+ `find "#{output_path(target)}/#{target.product_module_name}.xcframework" -name '*.swiftinterface' -exec sed -i -e #{replaceString1} #{replaceString2} #{replaceString3} #{replaceString4} {} \\\;`
140
+ end
141
+ #remove dublication name in other frameworks
142
+ allDirTargets = Dir["#{@options[:output_path]}/*"].map { |x| x.gsub("#{@options[:output_path]}/", "") }
143
+ replaceString = allDirTargets.map { |x| x.product_module_name }.uniq().map{ |x| x.gsub('/', '\/')}.map{|x| "-e 's/#{x}\\.#{x}/#{x}/g'"}.join(' ')
144
+ Pod::UI.puts_indented "$ find #{@options[:output_path]} -name '*.swiftinterface' -exec sed -i -e #{replaceString} {} \\\;"
145
+ `find #{@options[:output_path]} -name '*.swiftinterface' -exec sed -i -e #{replaceString} {} \\\;`
146
+ end
147
+
128
148
  def create_fat_framework(target)
129
149
  # When merging contents of `simulator` & `device`, prefer contents of `device` over `simulator`
130
150
  # https://github.com/grab/cocoapods-binary-cache/issues/25
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.3
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugene Antropov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-17 00:00:00.000000000 Z
11
+ date: 2022-01-20 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