pod-builder 2.0.0.beta.22 → 2.0.0.beta.23

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: 7884fca89b1f5498840e59b6e590836862749f7753f889120d7bd33bdc05a201
4
- data.tar.gz: 3936b3ec07e51655f368c2c1001874b4933476d3678096d15184e0a36515be6b
3
+ metadata.gz: 16bb73e4ce3559e587cb45b0b80e7e92b1b904a016a09ef8769bdc5f36bd3c3b
4
+ data.tar.gz: 1b7990f9999ff210171bc012d2ae3d72b96b2cce7fd273906ed97351dcf74694
5
5
  SHA512:
6
- metadata.gz: 6c0e8f13ca1a0a3c970c41722bae17a19236295fb3192cf6e5ff52a05507c831bf157363a3725b2184799451cd36a04a8c85c840ec33991f2d75bc890b2b1019
7
- data.tar.gz: 5a340dc6930ec07ba988b3836a03a6caa7e2a7c9f033f6b901b5e7363353c1a4487e11ef8908adb0549a19dce1c13b1405a486baaa130f02716e85cd9857cb5c
6
+ metadata.gz: 7344c45e940ba2d2ff9b9c4cef8ca43fc49e07151b17124fceb1cccad2ce7cfaafcfe20e6de71cd58792db839a4c28ea61c9928eb5511b429deda37166df0824
7
+ data.tar.gz: 92b7caed18491251d38ed4f90325b968e3fb5d6dced12b98d34a96522904472231f61a31e471c3ed095863a8d489074de6ef053bcdfeb5a865a103dcf635e349
@@ -120,7 +120,7 @@ module PodBuilder
120
120
 
121
121
  xcodeprojects = Dir.glob("#{home}/**/#{project_name}.xcodeproj").select { |x|
122
122
  folder_in_home = x.gsub(home, "")
123
- !folder_in_home.include?("/Pods/") && !x.include?(PodBuilder::basepath("Sources")) && !x.include?(basepath)
123
+ !folder_in_home.include?("/Pods/") && !x.include?(PodBuilder::basepath("Sources")) && !x.include?(PodBuilder::basepath + "/")
124
124
  }
125
125
  raise "\n\nxcodeproj not found!".red if xcodeprojects.count == 0
126
126
  raise "\n\nFound multiple xcodeproj:\n#{xcodeprojects.join("\n")}".red if xcodeprojects.count > 1
@@ -136,7 +136,7 @@ module PodBuilder
136
136
 
137
137
  xcworkspaces = Dir.glob("#{home}/**/#{Configuration.project_name}*.xcworkspace").select { |x|
138
138
  folder_in_home = x.gsub(home, "")
139
- !folder_in_home.include?("/Pods/") && !x.include?(PodBuilder::basepath("Sources")) && !x.include?(basepath) && !x.include?(".xcodeproj/")
139
+ !folder_in_home.include?("/Pods/") && !x.include?(PodBuilder::basepath("Sources")) && !x.include?(PodBuilder::basepath + "/") && !x.include?(".xcodeproj/")
140
140
  }
141
141
  raise "\n\nxcworkspace not found!".red if xcworkspaces.count == 0
142
142
  raise "\n\nFound multiple xcworkspaces:\n#{xcworkspaces.join("\n")}".red if xcworkspaces.count > 1
@@ -17,7 +17,8 @@ module PodBuilder
17
17
 
18
18
  platform = analyzer.instance_variable_get("@result").targets.first.platform
19
19
 
20
- install_using_frameworks = analyzer.podfile.root_target_definitions.map(&:uses_frameworks?).uniq.first
20
+ install_using_frameworks = install_using_frameworks(analyzer)
21
+
21
22
  podfile.sub!("%%%use_frameworks%%%", install_using_frameworks ? "use_frameworks!" : "")
22
23
 
23
24
  podfile.sub!("%%%platform_name%%%", platform.name.to_s)
@@ -180,7 +181,7 @@ module PodBuilder
180
181
  next
181
182
  end
182
183
 
183
- if pod_name = pod_definition_in(line, true)
184
+ if pod_name = pod_definition_in(line, true)
184
185
  if podfile_item = all_buildable_items.detect { |x| x.name == pod_name }
185
186
  marker = podfile_item.prebuilt_marker()
186
187
 
@@ -198,7 +199,7 @@ module PodBuilder
198
199
  dep_item = all_buildable_items.detect { |x| x.name == dep.name }
199
200
 
200
201
  if File.exist?(dep_item.prebuilt_podspec_path) && !dep_item.is_prebuilt
201
- pod_name = dep_item.prebuilt_entry(false)
202
+ pod_name = dep_item.prebuilt_entry(false, false)
202
203
  prebuilt_lines.push("#{line.detect_indentation}#{pod_name}#{marker}\n")
203
204
  end
204
205
 
@@ -676,5 +677,21 @@ module PodBuilder
676
677
 
677
678
  return podfile_content
678
679
  end
680
+
681
+ def self.install_using_frameworks(analyzer)
682
+ target_settings = analyzer.podfile.target_definition_list.map(&:uses_frameworks?).uniq
683
+ if target_settings.count == 1
684
+ if target_settings.first == false
685
+ raise "\n\nOnly framework packaging currently supported. Please add 'use_frameworks!' at Podfile root level (not nested in targets)".red
686
+ end
687
+ return target_settings.first
688
+ elsif target_settings.count > 1
689
+ raise "\n\n'use_frameworks!' should be declared only once at Podfile root level (not nested in targets)".red
690
+ else
691
+ raise "\n\nFailed detecting use_frameworks!"
692
+ end
693
+
694
+ return true
695
+ end
679
696
  end
680
697
  end
@@ -49,7 +49,7 @@ module Pod
49
49
  pod_entries = pod_entries.uniq.sort_by { |t| t.name }
50
50
 
51
51
  prebuild_entries.each do |pod|
52
- target_s += "#{child_indentation}#{pod.prebuilt_entry(false)}\n"
52
+ target_s += "#{child_indentation}#{pod.prebuilt_entry(false, false)}\n"
53
53
  end
54
54
  pod_entries.each do |pod|
55
55
  target_s += "#{child_indentation}#{pod.entry(true, false)}\n"
@@ -401,7 +401,7 @@ module PodBuilder
401
401
  if absolute_path
402
402
  return podspec_path
403
403
  else
404
- pod_path = Pathname.new(podspec_path).relative_path_from(Pathname.new(PodBuilder::project_path)).to_s
404
+ pod_path = Pathname.new(podspec_path).relative_path_from(Pathname.new(PodBuilder::basepath)).to_s
405
405
  end
406
406
  end
407
407
 
@@ -1,4 +1,4 @@
1
1
  module PodBuilder
2
- VERSION = "2.0.0.beta.22"
2
+ VERSION = "2.0.0.beta.23"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pod-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta.22
4
+ version: 2.0.0.beta.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Camin