cocoapods-binary 0.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods-binary/Integration.rb +3 -5
- data/lib/cocoapods-binary/Main.rb +18 -0
- data/lib/cocoapods-binary/Prebuild.rb +3 -3
- data/lib/cocoapods-binary/gem_version.rb +1 -1
- data/lib/cocoapods-binary/rome/build_framework.rb +13 -7
- data/lib/cocoapods-binary/tool/tool.rb +0 -24
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b94ec6d8eea9b4b28d5dfad282b0e27ee21fa2d187140b0b4396b63fe729366
|
4
|
+
data.tar.gz: f96cfbf68def793a2b3d89ab12e4a04d94d474dca20edea3300c1f242fdfe0c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d55f919ec0936fa2e22072d174c154b1a11248f70e359833fe279b6a0f7409011e80c83ff90bcf3ea7eca6158c803c6bc74d6d0048d558a45530e80b2e8f145
|
7
|
+
data.tar.gz: 8ecf054e300bd422b80f22424411aa5cb6ad45fdac334b129c8e6b8823feb5bacb7c13c924b96e4e9c199886db138f663851f4fd87b1596045430885246ea018
|
@@ -49,11 +49,8 @@ module Pod
|
|
49
49
|
changes = Pod::Prebuild.framework_changes
|
50
50
|
updated_names = []
|
51
51
|
if changes == nil
|
52
|
-
puts "aaaaa"
|
53
52
|
updated_names = PrebuildSandbox.from_standard_sandbox(self.sandbox).exsited_framework_names
|
54
53
|
else
|
55
|
-
puts "bbbbb"
|
56
|
-
puts changes
|
57
54
|
added = changes[:added] || []
|
58
55
|
changed = changes[:changed] || []
|
59
56
|
deleted = changes[:removed] || []
|
@@ -67,6 +64,9 @@ module Pod
|
|
67
64
|
# delete the cached files
|
68
65
|
target_path = self.sandbox.pod_dir(root_name)
|
69
66
|
target_path.rmtree if target_path.exist?
|
67
|
+
|
68
|
+
support_path = sandbox.target_support_files_dir(root_name)
|
69
|
+
support_path.rmtree if support_path.exist?
|
70
70
|
end
|
71
71
|
|
72
72
|
end
|
@@ -76,8 +76,6 @@ module Pod
|
|
76
76
|
old_method2 = instance_method(:resolve_dependencies)
|
77
77
|
define_method(:resolve_dependencies) do
|
78
78
|
|
79
|
-
puts "ddddddddd"
|
80
|
-
|
81
79
|
# Remove the old target files, else it will not notice file changes
|
82
80
|
self.remove_target_files_if_needed
|
83
81
|
old_method2.bind(self).()
|
@@ -2,6 +2,24 @@
|
|
2
2
|
|
3
3
|
require_relative 'podfile_options'
|
4
4
|
|
5
|
+
module Pod
|
6
|
+
class Podfile
|
7
|
+
module DSL
|
8
|
+
|
9
|
+
# enable bitcode for prebuilt frameworks
|
10
|
+
def enable_bitcode_for_prebuilt_frameworks!
|
11
|
+
@@bitcode_enabled = true
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
@@bitcode_enabled = false
|
16
|
+
def self.is_bitcode_enabled
|
17
|
+
@@bitcode_enabled
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
5
23
|
Pod::HooksManager.register('cocoapods-binary', :pre_install) do |installer_context|
|
6
24
|
|
7
25
|
require_relative 'feature_switches'
|
@@ -27,7 +27,6 @@ module Pod
|
|
27
27
|
return false if local_manifest == nil
|
28
28
|
|
29
29
|
changes = local_manifest.detect_changes_with_podfile(podfile)
|
30
|
-
puts changes
|
31
30
|
Pod::Prebuild.framework_changes = changes # save the chagnes info for later stage
|
32
31
|
added = changes[:added] || []
|
33
32
|
changed = changes[:changed] || []
|
@@ -60,6 +59,7 @@ module Pod
|
|
60
59
|
local_manifest = self.local_manifest
|
61
60
|
sandbox_path = sandbox.root
|
62
61
|
existed_framework_folder = sandbox.generate_framework_path
|
62
|
+
bitcode_enabled = Pod::Podfile::DSL.is_bitcode_enabled
|
63
63
|
|
64
64
|
if local_manifest != nil
|
65
65
|
|
@@ -93,10 +93,10 @@ module Pod
|
|
93
93
|
pod_target.root_spec.name == pod_name
|
94
94
|
end
|
95
95
|
end
|
96
|
-
Pod::Prebuild.build(sandbox_path, existed_framework_folder, targets)
|
96
|
+
Pod::Prebuild.build(sandbox_path, existed_framework_folder, targets, bitcode_enabled)
|
97
97
|
|
98
98
|
else
|
99
|
-
Pod::Prebuild.build(sandbox_path, existed_framework_folder, self.pod_targets)
|
99
|
+
Pod::Prebuild.build(sandbox_path, existed_framework_folder, self.pod_targets, bitcode_enabled)
|
100
100
|
end
|
101
101
|
|
102
102
|
# Remove useless files
|
@@ -11,13 +11,18 @@ PLATFORMS = { 'iphonesimulator' => 'iOS',
|
|
11
11
|
# @param [PodTarget] target
|
12
12
|
# a specific pod target
|
13
13
|
#
|
14
|
-
def build_for_iosish_platform(sandbox, build_dir, target, device, simulator)
|
14
|
+
def build_for_iosish_platform(sandbox, build_dir, target, device, simulator, bitcode_enabled)
|
15
15
|
deployment_target = target.platform.deployment_target.to_s
|
16
16
|
|
17
17
|
target_label = target.label
|
18
18
|
Pod::UI.puts "Prebuilding #{target_label}..."
|
19
|
-
|
20
|
-
|
19
|
+
|
20
|
+
other_options = []
|
21
|
+
if bitcode_enabled
|
22
|
+
other_options += ['OTHER_CFLAGS="-fembed-bitcode"']
|
23
|
+
end
|
24
|
+
xcodebuild(sandbox, target_label, device, deployment_target, other_options)
|
25
|
+
xcodebuild(sandbox, target_label, simulator, deployment_target, other_options + ['ARCHS=x86_64', 'ONLY_ACTIVE_ARCH=NO'])
|
21
26
|
|
22
27
|
root_name = target.pod_name
|
23
28
|
module_name = target.product_module_name
|
@@ -38,10 +43,11 @@ def build_for_iosish_platform(sandbox, build_dir, target, device, simulator)
|
|
38
43
|
FileUtils.rm device_lib if File.file?(device_lib)
|
39
44
|
end
|
40
45
|
|
41
|
-
def xcodebuild(sandbox, target, sdk='macosx', deployment_target=nil)
|
42
|
-
args = %W(-project #{sandbox.project_path.realdirpath} -scheme #{target} -configuration #{CONFIGURATION} -sdk #{sdk})
|
46
|
+
def xcodebuild(sandbox, target, sdk='macosx', deployment_target=nil, other_options=[])
|
47
|
+
args = %W(-project #{sandbox.project_path.realdirpath} -scheme #{target} -configuration #{CONFIGURATION} -sdk #{sdk} )
|
43
48
|
platform = PLATFORMS[sdk]
|
44
49
|
args += Fourflusher::SimControl.new.destination(:oldest, platform, deployment_target) unless platform.nil?
|
50
|
+
args += other_options
|
45
51
|
Pod::Executable.execute_command 'xcodebuild', args, true
|
46
52
|
end
|
47
53
|
|
@@ -61,7 +67,7 @@ module Pod
|
|
61
67
|
# [Array<PodTarget>] targets
|
62
68
|
# The pod targets to build
|
63
69
|
#
|
64
|
-
def self.build(sandbox_root_path, output_path, targets)
|
70
|
+
def self.build(sandbox_root_path, output_path, targets, bitcode_enabled = false)
|
65
71
|
|
66
72
|
return unless not targets.empty?
|
67
73
|
|
@@ -78,7 +84,7 @@ module Pod
|
|
78
84
|
|
79
85
|
targets.each do |target|
|
80
86
|
case target.platform.name
|
81
|
-
when :ios then build_for_iosish_platform(sandbox, build_dir, target, 'iphoneos', 'iphonesimulator')
|
87
|
+
when :ios then build_for_iosish_platform(sandbox, build_dir, target, 'iphoneos', 'iphonesimulator', bitcode_enabled)
|
82
88
|
when :osx then xcodebuild(sandbox, target.label)
|
83
89
|
when :tvos then nil
|
84
90
|
when :watchos then nil
|
@@ -9,28 +9,4 @@
|
|
9
9
|
#
|
10
10
|
def class_attr_accessor(symbol)
|
11
11
|
self.class.send(:attr_accessor, symbol)
|
12
|
-
end
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
class Object
|
17
|
-
def deep_clone
|
18
|
-
return @deep_cloning_obj if @deep_cloning
|
19
|
-
@deep_cloning_obj = clone
|
20
|
-
@deep_cloning_obj.instance_variables.each do |var|
|
21
|
-
val = @deep_cloning_obj.instance_variable_get(var)
|
22
|
-
begin
|
23
|
-
@deep_cloning = true
|
24
|
-
val = val.deep_clone
|
25
|
-
rescue TypeError
|
26
|
-
next
|
27
|
-
ensure
|
28
|
-
@deep_cloning = false
|
29
|
-
end
|
30
|
-
@deep_cloning_obj.instance_variable_set(var, val)
|
31
|
-
end
|
32
|
-
deep_cloning_obj = @deep_cloning_obj
|
33
|
-
@deep_cloning_obj = nil
|
34
|
-
deep_cloning_obj
|
35
|
-
end
|
36
12
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-binary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- leavez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|