cocoapods-force-static-framework 0.0.4 → 0.0.5
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f1f422c5fef3b63af4885a2e85d51d5569ae14a1bab869c392210c561601b3e4
|
4
|
+
data.tar.gz: c3f67ed62bd9a318954ff37aa506f04e3df41136203b7aa64135558d042909f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58ada5174baf94baa83629fee0e2be3b3b739bc23db1dd16d9c5ef9e6df2b37e3b93df5333965e29cda67457130f7db4977fe1b5c27d1870578183a166103bc5
|
7
|
+
data.tar.gz: d831bfe684101586bb85e05dae00b4d75f142831bdc89212260204cc03d9d0af08b75d68bf30971a756f3aa60b89d5b61983cc7f929b28bfcd4b3afae762cfec
|
@@ -1,76 +1,45 @@
|
|
1
1
|
module Pod
|
2
2
|
|
3
|
-
|
4
|
-
def self.keyword
|
5
|
-
:static
|
6
|
-
end
|
7
|
-
end
|
3
|
+
@@static_frameworks = []
|
8
4
|
|
9
|
-
|
5
|
+
def self.store_static_framework_names(names)
|
6
|
+
@@static_frameworks = names
|
7
|
+
end
|
10
8
|
|
11
|
-
|
9
|
+
def self.static_framework_names
|
10
|
+
@@static_frameworks
|
11
|
+
end
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
13
|
+
class Specification
|
14
|
+
def self.from_string(spec_contents, path, subspec_name = nil)
|
15
|
+
name = ''
|
16
|
+
path = Pathname.new(path).expand_path
|
17
|
+
spec = nil
|
18
|
+
case path.extname
|
19
|
+
when '.podspec'
|
20
|
+
name = File.basename(path, '.podspec')
|
21
|
+
Dir.chdir(path.parent.directory? ? path.parent : Dir.pwd) do
|
22
|
+
spec = ::Pod._eval_podspec(spec_contents, path)
|
23
|
+
unless spec.is_a?(Specification)
|
24
|
+
raise Informative, "Invalid podspec file at path `#{path}`."
|
22
25
|
end
|
23
26
|
end
|
27
|
+
when '.json'
|
28
|
+
name = File.basename(path, '.podspec.json')
|
29
|
+
spec = Specification.from_json(spec_contents)
|
30
|
+
else
|
31
|
+
raise Informative, "Unsupported specification format `#{path.extname}` for spec at `#{path}`."
|
24
32
|
end
|
25
|
-
|
26
|
-
|
27
|
-
names = @force_static_framework_names || []
|
28
|
-
if parent != nil and parent.kind_of? TargetDefinition
|
29
|
-
names += parent.force_static_framework_names
|
30
|
-
end
|
31
|
-
names
|
33
|
+
if Pod.static_framework_names.include?(name)
|
34
|
+
spec.static_framework = true
|
32
35
|
end
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
define_method(:parse_inhibit_warnings) do |name, requirements|
|
37
|
-
parse_force_static_framework(name, requirements)
|
38
|
-
old_method.bind(self).(name, requirements)
|
39
|
-
end
|
40
|
-
|
36
|
+
spec.defined_in_file = path
|
37
|
+
spec.subspec_by_name(subspec_name, true)
|
41
38
|
end
|
42
39
|
end
|
43
40
|
|
44
|
-
class PodTarget
|
45
|
-
|
46
|
-
old_method = instance_method(:initialize)
|
47
|
-
|
48
|
-
define_method(:initialize) do |sandbox, host_requires_frameworks, user_build_configurations, archs, platform, specs, target_definitions, file_accessors, scope_suffix, build_type|
|
49
|
-
reval = build_type[:build_type]
|
50
|
-
if target_definitions.first.force_static_framework_names.include?(Specification.root_name(specs.first.name))
|
51
|
-
reval = Target::BuildType.static_framework
|
52
|
-
end
|
53
|
-
old_method.bind(self).(sandbox, host_requires_frameworks, user_build_configurations, archs, platform, specs, target_definitions, file_accessors, scope_suffix, :build_type => reval)
|
54
|
-
end
|
55
|
-
|
56
|
-
end
|
57
|
-
|
58
41
|
end
|
59
42
|
|
60
|
-
|
61
|
-
|
62
|
-
module DSL
|
63
|
-
|
64
|
-
def force_static_framework_enable!
|
65
|
-
@@option_force_static_framework_enable = true
|
66
|
-
end
|
67
|
-
|
68
|
-
def self.force_static_framework_enable
|
69
|
-
@@option_force_static_framework_enable
|
70
|
-
end
|
71
|
-
|
72
|
-
@@option_force_static_framework_enable = false
|
73
|
-
|
74
|
-
end
|
75
|
-
end
|
43
|
+
Pod::HooksManager.register('cocoapods-force-static-framework', :pre_install) do |context, options|
|
44
|
+
Pod.store_static_framework_names(options[:static_frameworks])
|
76
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-force-static-framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- maqiang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -69,8 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
|
73
|
-
rubygems_version: 2.5.2.3
|
72
|
+
rubygems_version: 3.0.3
|
74
73
|
signing_key:
|
75
74
|
specification_version: 4
|
76
75
|
summary: A longer description of cocoapods-force-static-framework.
|