pod-builder 0.1.5 → 0.1.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: affaaa6d7e1e64bb565d0aae5dd4a28f50ba89235aed7921e83b0d5063ca457b
4
- data.tar.gz: 3319855576eaef9bfcfd9b1482dce7c68c15b3ee1a508146091fc5819841933d
3
+ metadata.gz: 6cd72df247e9167eaab28018d45a0d472bacb2fb10ae30f3024056bf05d3b81f
4
+ data.tar.gz: a5dcc842f4e72712adee80fe25884551da99cc98a0ba1225ea282d26ee454146
5
5
  SHA512:
6
- metadata.gz: 8917d03d818496326ae07cabc3986b0b0b362b87576eee498f7aee74a1fb2cfb29751ea58d263c990f17489cb730aed9f79e418ddc4e3d5932e146ef2241fa7f
7
- data.tar.gz: c23be617294d6cc46159cce0a899d87c48fb3e47e6865dc7b1477706a64cd7983eb9ee036fa83241770747d523ab0b206caaa28a8e703c3e9c800c117ed98585
6
+ metadata.gz: ec05a3563dd83e63921bd133ee649c558314ba4ee386916dd31e420f3970fc8167d4dfa0b88d9f611a5d1efa320400494cd9b5b411db100f595e6e40584a594f
7
+ data.tar.gz: 66f07fa9a0d837353e524ab56ef7a237036d9450ca9ba032eeaac7898db0233314594952ea2572696500c585cfc8e25dd3338a13f0b54eec0be8a85648219af0
data/.vscode/launch.json CHANGED
@@ -55,7 +55,7 @@
55
55
  "args": [
56
56
  "build",
57
57
  "-d",
58
- "SBTGalleryView",
58
+ "MessagingUIViews/Core",
59
59
  ]
60
60
  },
61
61
  {
data/README.md CHANGED
@@ -133,6 +133,23 @@ Xcode build settings to use. You can override the default values which are:
133
133
  }
134
134
  ```
135
135
 
136
+ #### `build_settings_overrides`
137
+
138
+ Like `build_settings` but per pod. Pod name can also refer to subspec.
139
+
140
+ ```json
141
+ {
142
+ "build_settings_overrides": {
143
+ "PodA": {
144
+ "SWIFT_OPTIMIZATION_LEVEL": "-O"
145
+ },
146
+ "PodB/Subspec": {
147
+ "APPLICATION_EXTENSION_API_ONLY": "NO"
148
+ }
149
+ }
150
+ }
151
+ ```
152
+
136
153
  #### `build_system`
137
154
 
138
155
  Specify which build system to use to compile frameworks. Either `Legacy` (standard build system) or `Latest` (new build system). Default value: `Legacy`.
@@ -4,11 +4,12 @@ module PodBuilder
4
4
  class Configuration
5
5
  class <<self
6
6
  attr_accessor :build_settings
7
+ attr_accessor :build_settings_overrides
7
8
  attr_accessor :build_system
8
9
  attr_accessor :config_file
9
10
  attr_accessor :base_path
10
11
  attr_accessor :build_path
11
- attr_accessor :spec_overrides
12
+ attr_accessor :spec_overrides
12
13
  attr_accessor :skip_licenses
13
14
  attr_accessor :license_file_name
14
15
  end
@@ -22,6 +23,7 @@ module PodBuilder
22
23
  "SWIFT_OPTIMIZATION_LEVEL" => "-Osize",
23
24
  "SWIFT_COMPILATION_MODE" => "Incremental",
24
25
  }
26
+ @build_settings_overrides = {}
25
27
  @build_system = "Legacy" # either Latest (New build system) or Legacy (Standard build system)
26
28
  @config_file = "PodBuilder.json"
27
29
  @base_path = "Frameworks"
@@ -58,6 +60,9 @@ module PodBuilder
58
60
  if config.has_key?("build_settings")
59
61
  Configuration.build_settings = config["build_settings"]
60
62
  end
63
+ if config.has_key?("build_settings_overrides")
64
+ Configuration.build_settings_overrides = config["build_settings_overrides"]
65
+ end
61
66
  if config.has_key?("build_system")
62
67
  Configuration.build_system = config["build_system"]
63
68
  end
@@ -22,9 +22,11 @@ module PodBuilder
22
22
  build_settings = Configuration.build_settings
23
23
  podfile_build_settings = ""
24
24
  items.each do |item|
25
- build_settings['SWIFT_VERSION'] = item.swift_version || project_swift_version(analyzer)
26
- if swift_optimization_level = item.swift_optimization_level
27
- build_settings['SWIFT_OPTIMIZATION_LEVEL'] = swift_optimization_level
25
+ item_build_settings = Configuration.build_settings_overrides[item.name] || {}
26
+ build_settings['SWIFT_VERSION'] = item_build_settings["SWIFT_VERSION"] || project_swift_version(analyzer)
27
+
28
+ item_build_settings.each do |k, v|
29
+ build_settings[k] = v
28
30
  end
29
31
 
30
32
  podfile_build_settings += "set_build_settings(\"#{item.root_name}\", #{build_settings.to_s}, installer)\n "
@@ -62,13 +62,6 @@ module PodBuilder
62
62
  #
63
63
  attr_accessor :build_configuration
64
64
 
65
- # @return [String] The pod's swift optimization level overriding
66
- # build_settings in PodBuilder::Configuration::build_configuration.
67
- #
68
- # This is a workaround to overcome segmentation faults that might trigger by certain optimization level
69
- #
70
- attr_accessor :swift_optimization_level
71
-
72
65
  # Initialize a new instance
73
66
  #
74
67
  # @param [Specification] spec
@@ -113,8 +106,6 @@ module PodBuilder
113
106
  @xcconfig = spec.root.attributes_hash["xcconfig"] || {}
114
107
  @build_configuration = spec.root.attributes_hash.dig("pod_target_xcconfig", "prebuild_configuration") || "release"
115
108
  @build_configuration.downcase!
116
-
117
- @swift_optimization_level = spec.root.attributes_hash.dig("pod_target_xcconfig", "swift_optimization_level")
118
109
  end
119
110
 
120
111
  def inspect
@@ -1,4 +1,4 @@
1
1
  module PodBuilder
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
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: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Camin