cocoapods-xcframework 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 +4 -4
- data/README.md +2 -1
- data/lib/cocoapods-framework/command/framework.rb +4 -2
- data/lib/cocoapods-framework/frameworker.rb +3 -1
- data/lib/cocoapods-framework/gem_version.rb +1 -1
- data/lib/cocoapods-framework/util.rb +1 -0
- data/lib/cocoapods-framework/util/error_util.rb +13 -0
- data/lib/cocoapods-framework/util/pod_util.rb +11 -12
- data/lib/cocoapods-framework/xbuilder.rb +10 -8
- data/lib/cocoapods-framework/xbuilder/xcode_xbuild.rb +5 -5
- data/pkg/cocoapods-xcframework-0.0.4.gem +0 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e585d673b3955cf72fabe8215902f92f47634ada97c293bd2acdf3a8e42a9622
|
4
|
+
data.tar.gz: 27d5a9e175c71b1701ec24bc0abaf31de9a57b396662574c08e5d485f81d085d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62df3f2b4a90787a7101851ebe5e1d78dbac8685d7edf6e2e3543879cee31ff37c05d9365bfd08e95dbdb6acdf53a0f799397a916b1fcac02e68a244012ecf7c
|
7
|
+
data.tar.gz: ea585449d6726c1ac2c5a493dfce82cc04cf58f8bc3b848c35bd779517cd111f61f883163cc4bf248c9e7b0382f30fb5de912759699ecfcaf4b090238efc68a1
|
data/README.md
CHANGED
@@ -30,7 +30,8 @@ module Pod
|
|
30
30
|
['--no-force', 'Overwrite existing files.'],
|
31
31
|
['--configuration', 'Build the specified configuration (e.g. Debug). Defaults to Release'],
|
32
32
|
['--spec-sources=private,https://github.com/CocoaPods/Specs.git', 'The sources to pull dependent pods from (defaults to https://github.com/CocoaPods/Specs.git)'],
|
33
|
-
['--subspecs', 'Only include the given subspecs']
|
33
|
+
['--subspecs', 'Only include the given subspecs'],
|
34
|
+
['--use-modular-headers', 'pakcage uses modular headers during packaging']
|
34
35
|
].concat super
|
35
36
|
end
|
36
37
|
|
@@ -41,6 +42,7 @@ module Pod
|
|
41
42
|
subspecs = argv.option('subspecs')
|
42
43
|
@subspecs = subspecs.split(',') unless subspecs.nil?
|
43
44
|
@configuration = argv.option('configuration', 'Release')
|
45
|
+
@use_modular_headers = argv.option('use-modular-headers', true)
|
44
46
|
@force = argv.flag?('force', true)
|
45
47
|
super
|
46
48
|
end
|
@@ -51,7 +53,7 @@ module Pod
|
|
51
53
|
end
|
52
54
|
|
53
55
|
def run
|
54
|
-
frameworker = Frameworker.new(@name, @source, @spec_sources, @subspecs, @configuration, @force)
|
56
|
+
frameworker = Frameworker.new(@name, @source, @spec_sources, @subspecs, @configuration, @force, @use_modular_headers)
|
55
57
|
frameworker.run
|
56
58
|
end
|
57
59
|
end
|
@@ -3,13 +3,14 @@ module Pod
|
|
3
3
|
include PodUtil
|
4
4
|
include DirUtil
|
5
5
|
include Config::Mixin
|
6
|
-
def initialize(name, source, spec_sources, subspecs, configuration, force)
|
6
|
+
def initialize(name, source, spec_sources, subspecs, configuration, force, use_modular_headers)
|
7
7
|
@name = name
|
8
8
|
@source = source
|
9
9
|
@spec_sources = spec_sources
|
10
10
|
@subspecs = subspecs
|
11
11
|
@configuration = configuration
|
12
12
|
@force = force
|
13
|
+
@use_modular_headers = use_modular_headers
|
13
14
|
end
|
14
15
|
|
15
16
|
def run
|
@@ -35,6 +36,7 @@ module Pod
|
|
35
36
|
spec,
|
36
37
|
@subspecs,
|
37
38
|
@spec_sources,
|
39
|
+
@use_modular_headers
|
38
40
|
)
|
39
41
|
|
40
42
|
perform_build(
|
@@ -8,12 +8,12 @@ module Pod
|
|
8
8
|
@path = path.expand_path
|
9
9
|
|
10
10
|
if @path.directory?
|
11
|
-
|
11
|
+
raise @path + ': is a directory.'
|
12
12
|
return
|
13
13
|
end
|
14
14
|
|
15
15
|
unless ['.podspec', '.json'].include? @path.extname
|
16
|
-
|
16
|
+
raise @path + ': is not a podspec.'
|
17
17
|
return
|
18
18
|
end
|
19
19
|
|
@@ -33,25 +33,23 @@ module Pod
|
|
33
33
|
Sandbox.new(config.sandbox_root)
|
34
34
|
end
|
35
35
|
|
36
|
-
def installation_root sandbox, spec, subspecs, sources,use_frameworks = true
|
36
|
+
def installation_root sandbox, spec, subspecs, sources,use_frameworks = true,use_modular_headers = true
|
37
37
|
podfile = podfile_from_spec(
|
38
38
|
@path,
|
39
39
|
spec,
|
40
|
-
# platform,
|
41
40
|
subspecs,
|
42
41
|
sources,
|
43
|
-
use_frameworks
|
42
|
+
use_frameworks,
|
43
|
+
use_modular_headers
|
44
44
|
)
|
45
45
|
|
46
46
|
installer = Installer.new(sandbox, podfile)
|
47
|
-
puts podfile.to_hash.to_json
|
48
47
|
installer.install!
|
49
48
|
|
50
49
|
unless installer.nil?
|
51
50
|
installer.pods_project.targets.each do |target|
|
52
51
|
target.build_configurations.each do |configuration|
|
53
|
-
configuration.build_settings['CLANG_MODULES_AUTOLINK'] = 'NO'
|
54
|
-
configuration.build_settings['GCC_GENERATE_DEBUGGING_SYMBOLS'] = 'NO'
|
52
|
+
# configuration.build_settings['CLANG_MODULES_AUTOLINK'] = 'NO'
|
55
53
|
end
|
56
54
|
end
|
57
55
|
installer.pods_project.save
|
@@ -59,7 +57,7 @@ module Pod
|
|
59
57
|
installer
|
60
58
|
end
|
61
59
|
|
62
|
-
def podfile_from_spec path, spec, subspecs, sources, use_frameworks = true
|
60
|
+
def podfile_from_spec path, spec, subspecs, sources, use_frameworks = true, use_modular_headers=true
|
63
61
|
options = Hash.new
|
64
62
|
options[:podspec] = path.to_s
|
65
63
|
options[:subspecs] = subspecs if subspecs
|
@@ -77,8 +75,9 @@ module Pod
|
|
77
75
|
:integrate_targets => false,
|
78
76
|
:deterministic_uuids => false)
|
79
77
|
|
80
|
-
|
81
|
-
|
78
|
+
use_frameworks! if use_frameworks
|
79
|
+
use_modular_headers! if use_modular_headers
|
80
|
+
end
|
82
81
|
end
|
83
82
|
|
84
83
|
def generic_new_podspec_hash spec
|
@@ -106,4 +105,4 @@ module Pod
|
|
106
105
|
spec_hash
|
107
106
|
end
|
108
107
|
end
|
109
|
-
end
|
108
|
+
end
|
@@ -21,10 +21,11 @@ module Pod
|
|
21
21
|
UI.puts("Building framework #{@spec} with configuration #{@configuration}")
|
22
22
|
UI.puts "Work dir is :#{@sandbox_root}"
|
23
23
|
defines = "GCC_PREPROCESSOR_DEFINITIONS='$(inherited) PodsDummy_Pods_#{@spec.name}=PodsDummy_PodPackage_#{@spec.name}'"
|
24
|
-
# defines << ' ' << @spec.consumer(@platform).compiler_flags.join(' ')
|
25
24
|
|
26
25
|
if @configuration == 'Debug'
|
27
26
|
defines << 'GCC_GENERATE_DEBUGGING_SYMBOLS=YES ONLY_ACTIVE_ARCH=NO'
|
27
|
+
else
|
28
|
+
defines << "GCC_GENERATE_DEBUGGING_SYMBOLS=NO"
|
28
29
|
end
|
29
30
|
|
30
31
|
build_all_device defines
|
@@ -44,10 +45,10 @@ module Pod
|
|
44
45
|
command << "-framework #{framework} "
|
45
46
|
end
|
46
47
|
command << "-output #{@sandbox_root}/#{@spec.name}.xcframework 2>&1"
|
47
|
-
|
48
|
+
output = `#{command}`.lines.to_a
|
48
49
|
if $?.exitstatus != 0
|
49
|
-
|
50
|
-
Process.exit
|
50
|
+
Pod::ErrorUtil.error_report command,output
|
51
|
+
Process.exit -1
|
51
52
|
end
|
52
53
|
"#{@sandbox_root}/#{@spec.name}.xcframework"
|
53
54
|
end
|
@@ -94,11 +95,12 @@ module Pod
|
|
94
95
|
end
|
95
96
|
|
96
97
|
def outputs_xcframework target_dir
|
97
|
-
|
98
|
+
command = "cp -rp #{@outputs} #{target_dir} 2>&1"
|
99
|
+
output = `#{command}`.lines.to_a
|
98
100
|
if $?.exitstatus != 0
|
99
|
-
|
100
|
-
Process.exit
|
101
|
+
Pod::ErrorUtil.error_report command,output
|
102
|
+
Process.exit -1
|
101
103
|
end
|
102
104
|
end
|
103
105
|
end
|
104
|
-
end
|
106
|
+
end
|
@@ -3,18 +3,18 @@ module Pod
|
|
3
3
|
module XcodeXBuilder
|
4
4
|
def xcode_xbuild(defines, configuration, work_dir, build_dir = 'export')
|
5
5
|
if defined?(Pod::DONT_CODESIGN)
|
6
|
-
|
6
|
+
defines = "#{defines} CODE_SIGN_IDENTITY=\"\" CODE_SIGNING_REQUIRED=NO"
|
7
7
|
end
|
8
8
|
pwd = Pathname.pwd
|
9
9
|
Dir.chdir work_dir
|
10
10
|
command = "xcodebuild #{defines} BUILD_DIR=#{build_dir} BUILD_LIBRARY_FOR_DISTRIBUTION=YES clean build -configuration #{configuration} -alltargets 2>&1"
|
11
|
-
|
11
|
+
output = `#{command}`.lines.to_a
|
12
12
|
Dir.chdir pwd
|
13
13
|
if $?.exitstatus != 0
|
14
|
-
|
15
|
-
Process.exit
|
14
|
+
Pod::ErrorUtil.error_report command,output
|
15
|
+
Process.exit -1
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
20
|
-
end
|
20
|
+
end
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-xcframework
|
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
|
- 戴易超
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- lib/cocoapods-framework/gem_version.rb
|
79
79
|
- lib/cocoapods-framework/util.rb
|
80
80
|
- lib/cocoapods-framework/util/dir_util.rb
|
81
|
+
- lib/cocoapods-framework/util/error_util.rb
|
81
82
|
- lib/cocoapods-framework/util/pod_util.rb
|
82
83
|
- lib/cocoapods-framework/xbuilder.rb
|
83
84
|
- lib/cocoapods-framework/xbuilder/xcode_xbuild.rb
|
@@ -87,6 +88,7 @@ files:
|
|
87
88
|
- pkg/cocoapods-framework-0.0.1.gem
|
88
89
|
- pkg/cocoapods-framework-0.0.2.gem
|
89
90
|
- pkg/cocoapods-framework-0.0.3.gem
|
91
|
+
- pkg/cocoapods-xcframework-0.0.4.gem
|
90
92
|
- spec/command/framework_spec.rb
|
91
93
|
- spec/spec_helper.rb
|
92
94
|
homepage: https://github.com/TyrantDante/cocoapods-framework
|