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 +4 -4
- data/.vscode/launch.json +1 -1
- data/README.md +17 -0
- data/lib/pod_builder/configuration.rb +6 -1
- data/lib/pod_builder/podfile.rb +5 -3
- data/lib/pod_builder/podfile_item.rb +0 -9
- data/lib/pod_builder/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cd72df247e9167eaab28018d45a0d472bacb2fb10ae30f3024056bf05d3b81f
|
4
|
+
data.tar.gz: a5dcc842f4e72712adee80fe25884551da99cc98a0ba1225ea282d26ee454146
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec05a3563dd83e63921bd133ee649c558314ba4ee386916dd31e420f3970fc8167d4dfa0b88d9f611a5d1efa320400494cd9b5b411db100f595e6e40584a594f
|
7
|
+
data.tar.gz: 66f07fa9a0d837353e524ab56ef7a237036d9450ca9ba032eeaac7898db0233314594952ea2572696500c585cfc8e25dd3338a13f0b54eec0be8a85648219af0
|
data/.vscode/launch.json
CHANGED
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
|
data/lib/pod_builder/podfile.rb
CHANGED
@@ -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
|
-
|
26
|
-
|
27
|
-
|
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
|
data/lib/pod_builder/version.rb
CHANGED