cocoapods-kz 0.0.14 → 0.0.15
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/lib/cocoapods-kz/command/info.rb +5 -2
- data/lib/cocoapods-kz/command/repair.rb +19 -12
- data/lib/cocoapods-kz/gem_version.rb +1 -1
- data/lib/cocoapods-kz/helpers/kz_analyzer.rb +6 -0
- data/lib/cocoapods-kz/helpers/{kz_generator.rb → kz_generator_hmap.rb} +2 -222
- data/lib/cocoapods-kz/helpers/kz_generator_on_demand_resources.rb +231 -0
- data/lib/cocoapods-kz/helpers/kz_global_helper.rb +26 -7
- data/lib/cocoapods-kz/helpers/kz_pod_target.rb +72 -5
- data/lib/cocoapods-kz/helpers/repair_module_import.rb +1 -1
- data/lib/cocoapods-kz/native/build_configuration.rb +12 -0
- data/lib/cocoapods-kz/native/dls.rb +13 -7
- data/lib/cocoapods-kz/native/installer.rb +10 -2
- data/lib/cocoapods-kz/native/path_list.rb +11 -0
- data/lib/cocoapods-kz/native/pod_target_installer.rb +0 -20
- data/lib/cocoapods-kz/native/specification.rb +6 -0
- data/lib/cocoapods-kz/native/target_installer_helper.rb +16 -1
- data/lib/cocoapods-kz/native/target_integrator.rb +6 -12
- data/lib/cocoapods-kz/native.rb +2 -0
- data/lib/cocoapods-kz/resources/on_demand_resources/kz_on_demand_resources_process.rb +194 -0
- data/lib/cocoapods-kz/resources/on_demand_resources/kz_on_demand_resources_xocde.sh +4 -81
- metadata +7 -7
- data/lib/cocoapods-kz/native/dsl_spec.rb +0 -7
- data/lib/cocoapods-kz/resources/on_demand_resources/kz_complete_asset_pack_output_spec_plist.rb +0 -26
- data/lib/cocoapods-kz/resources/on_demand_resources/kz_create_asset_pack_manifest_plist.rb +0 -44
- data/lib/cocoapods-kz/resources/on_demand_resources/kz_create_on_demand_resources_plis.rb +0 -26
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-kz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yixiong
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -57,7 +57,8 @@ files:
|
|
57
57
|
- lib/cocoapods-kz/helpers/kz_analyzer.rb
|
58
58
|
- lib/cocoapods-kz/helpers/kz_config_result.rb
|
59
59
|
- lib/cocoapods-kz/helpers/kz_framework_manager.rb
|
60
|
-
- lib/cocoapods-kz/helpers/
|
60
|
+
- lib/cocoapods-kz/helpers/kz_generator_hmap.rb
|
61
|
+
- lib/cocoapods-kz/helpers/kz_generator_on_demand_resources.rb
|
61
62
|
- lib/cocoapods-kz/helpers/kz_global_helper.rb
|
62
63
|
- lib/cocoapods-kz/helpers/kz_log.rb
|
63
64
|
- lib/cocoapods-kz/helpers/kz_pod_target.rb
|
@@ -65,10 +66,11 @@ files:
|
|
65
66
|
- lib/cocoapods-kz/helpers/repair_module_import.rb
|
66
67
|
- lib/cocoapods-kz/native.rb
|
67
68
|
- lib/cocoapods-kz/native/acknowledgements.rb
|
69
|
+
- lib/cocoapods-kz/native/build_configuration.rb
|
68
70
|
- lib/cocoapods-kz/native/dls.rb
|
69
|
-
- lib/cocoapods-kz/native/dsl_spec.rb
|
70
71
|
- lib/cocoapods-kz/native/file_accessor.rb
|
71
72
|
- lib/cocoapods-kz/native/installer.rb
|
73
|
+
- lib/cocoapods-kz/native/path_list.rb
|
72
74
|
- lib/cocoapods-kz/native/pod_target.rb
|
73
75
|
- lib/cocoapods-kz/native/pod_target_installer.rb
|
74
76
|
- lib/cocoapods-kz/native/pod_target_integrator.rb
|
@@ -86,9 +88,7 @@ files:
|
|
86
88
|
- lib/cocoapods-kz/resources/kz_improve_custom_yaml.sh
|
87
89
|
- lib/cocoapods-kz/resources/kz_refresh_pods_pbxproj.rb
|
88
90
|
- lib/cocoapods-kz/resources/kz_xml_build.sh
|
89
|
-
- lib/cocoapods-kz/resources/on_demand_resources/
|
90
|
-
- lib/cocoapods-kz/resources/on_demand_resources/kz_create_asset_pack_manifest_plist.rb
|
91
|
-
- lib/cocoapods-kz/resources/on_demand_resources/kz_create_on_demand_resources_plis.rb
|
91
|
+
- lib/cocoapods-kz/resources/on_demand_resources/kz_on_demand_resources_process.rb
|
92
92
|
- lib/cocoapods-kz/resources/on_demand_resources/kz_on_demand_resources_xocde.sh
|
93
93
|
- lib/cocoapods_plugin.rb
|
94
94
|
homepage: https://github.com/EXAMPLE/cocoapods-kz
|
data/lib/cocoapods-kz/resources/on_demand_resources/kz_complete_asset_pack_output_spec_plist.rb
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
require 'xcodeproj'
|
2
|
-
autoload :Nanaimo, 'nanaimo'
|
3
|
-
|
4
|
-
def write_to_path(hash, path)
|
5
|
-
unless path.is_a?(String) || path.is_a?(Pathname)
|
6
|
-
raise TypeError, "The given `#{path}` must be a string or 'pathname'."
|
7
|
-
end
|
8
|
-
path = path.to_s
|
9
|
-
raise IOError, 'Empty path.' if path.empty?
|
10
|
-
|
11
|
-
File.open(path, 'w') do |f|
|
12
|
-
plist = Nanaimo::Plist.new(hash, :xml)
|
13
|
-
Nanaimo::Writer::XMLWriter.new(plist, :pretty => true, :output => f, :strict => false).write
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
on_demand_resources_folder = ARGV[0]
|
18
|
-
asset_pack_output_specifications_plist_path = ARGV[1]
|
19
|
-
asset_pack_output_specifications_plist = Xcodeproj::Plist.read_from_path(asset_pack_output_specifications_plist_path)
|
20
|
-
asset_pack_output_specifications_plist.each do |item|
|
21
|
-
bundle_paht = item["bundle-path"]
|
22
|
-
unless bundle_paht.start_with?(on_demand_resources_folder)
|
23
|
-
item["bundle-path"] = "#{on_demand_resources_folder}/#{bundle_paht}"
|
24
|
-
end
|
25
|
-
end
|
26
|
-
write_to_path(asset_pack_output_specifications_plist, asset_pack_output_specifications_plist_path)
|
@@ -1,44 +0,0 @@
|
|
1
|
-
require 'xcodeproj'
|
2
|
-
require "date"
|
3
|
-
|
4
|
-
on_demand_resources_path = ARGV[0]
|
5
|
-
manifest_template_plist_path = ARGV[1]
|
6
|
-
manifest_url = "http://127.0.0.1"
|
7
|
-
|
8
|
-
manifest_template_plist_hash = {}
|
9
|
-
manifest_template_resources = []
|
10
|
-
manifest_template_plist_hash["resources"] = manifest_template_resources
|
11
|
-
|
12
|
-
Dir.foreach(on_demand_resources_path) do |sub_file|
|
13
|
-
if sub_file != "." && sub_file != ".." && sub_file != ".DS_Store"
|
14
|
-
resources_item = {}
|
15
|
-
primary_content_hash = {}
|
16
|
-
time = Time.now
|
17
|
-
primary_content_hash["hash"] = time.utc.strftime('%Y-%m-%dT%H:%M:%S.000Z')
|
18
|
-
primary_content_hash["strategy"] = "modtime"
|
19
|
-
resources_item["primaryContentHash"] = primary_content_hash
|
20
|
-
resources_item["isStreamable"] = true
|
21
|
-
total_size = 0
|
22
|
-
Dir.foreach("#{on_demand_resources_path}/#{sub_file}") do |resource|
|
23
|
-
if resource != "." && resource != ".." && resource != ".DS_Store"
|
24
|
-
if resource == "Info.plist"
|
25
|
-
info_plist = Xcodeproj::Plist.read_from_path("#{on_demand_resources_path}/#{sub_file}/#{resource}")
|
26
|
-
priority = info_plist["Priority"]
|
27
|
-
if priority && priority > 0
|
28
|
-
resources_item["downloadPriority"] = priority
|
29
|
-
end
|
30
|
-
resources_item["bundleKey"] = info_plist["CFBundleIdentifier"]
|
31
|
-
else
|
32
|
-
resources_item["URL"] = "#{manifest_url}#{on_demand_resources_path}/#{sub_file}"
|
33
|
-
total_size = total_size + File.size("#{on_demand_resources_path}/#{sub_file}/#{resource}")
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
resources_item["uncompressedSize"] = total_size
|
38
|
-
manifest_template_resources << resources_item
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
if manifest_template_resources.size > 0
|
43
|
-
Xcodeproj::Plist.write_to_path(manifest_template_plist_hash, manifest_template_plist_path)
|
44
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require 'xcodeproj'
|
2
|
-
|
3
|
-
kz_on_demand_resources_path = ARGV[0]
|
4
|
-
on_demand_resources_plist_path = ARGV[1]
|
5
|
-
|
6
|
-
on_demand_resources_plist = {}
|
7
|
-
bundle_resource_request_tags = {}
|
8
|
-
on_demand_resources_plist["NSBundleResourceRequestTags"] = bundle_resource_request_tags
|
9
|
-
bundle_resource_request_asset_packs = {}
|
10
|
-
on_demand_resources_plist["NSBundleResourceRequestAssetPacks"] = bundle_resource_request_asset_packs
|
11
|
-
|
12
|
-
Dir.foreach(kz_on_demand_resources_path) do |sub_file|
|
13
|
-
if sub_file != "." && sub_file != ".." && sub_file != ".DS_Store"
|
14
|
-
Dir.foreach("#{kz_on_demand_resources_path}/#{sub_file}") do |plist|
|
15
|
-
if plist == "OnDemandResources.plist"
|
16
|
-
info_plist = Xcodeproj::Plist.read_from_path("#{kz_on_demand_resources_path}/#{sub_file}/#{plist}")
|
17
|
-
bundle_resource_request_tags.update(info_plist["NSBundleResourceRequestTags"])
|
18
|
-
bundle_resource_request_asset_packs.update(info_plist["NSBundleResourceRequestAssetPacks"])
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
if bundle_resource_request_tags.size > 0 || bundle_resource_request_asset_packs.size > 0
|
25
|
-
Xcodeproj::Plist.write_to_path(on_demand_resources_plist, on_demand_resources_plist_path)
|
26
|
-
end
|